You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GROUPS frames and bounded rank split peers with logically equal nested dictionary nulls #26689
Two one-element Arrow lists can both represent [NULL] when one contains a null dictionary key and the other contains a key pointing to a null dictionary value. GROUPS BETWEEN CURRENT ROW AND CURRENT ROW counts one row in each group. rank() and dense_rank() also split the peers when the planner chooses BoundedWindowAggExec.
To reproduce
Register this two-row batch in a Rust SessionContext.
SELECTcount(*) OVER (ORDER BY k GROUPS BETWEEN CURRENT ROW AND CURRENT ROW) FROM t;
SELECT rank() OVER w, dense_rank() OVER w FROM t WINDOW w AS (ORDER BY k);
SELECT rank() OVER w, dense_rank() OVER w, percent_rank() OVER w
FROM t WINDOW w AS (ORDER BY k);
Query
Physical operator observed
Output for the two rows
Expected
GROUPS count
BoundedWindowAggExec (Sorted)
1, 1
2, 2
Rank and dense rank
BoundedWindowAggExec (Sorted)
1, 2 for each function
1, 1 for each function
Rank and dense rank alongside percent rank
WindowAggExec
1, 1 for each rank function and 0.0, 0.0 for percent rank
Same
Reproduced at 99100274dd during review of #26067. GROUPS frame boundaries and bounded rank compare extracted ScalarValues. Batch rank uses Arrow partition boundaries, which group the two rows together. GROUPS boundaries · bounded rank · batch rank
Activity
fix: handle nested RANGE CURRENT ROW peers (apache#26067)