Summary
PR #270 adds first-class window-frame data to SQLWindowFunc, but intentionally supports only ROWS and RANGE. DataFusion 43 also resolves GROUPS frames; lower_window_frame currently rejects WindowFrameUnits::Groups with UnsupportedFeature.
GROUPS counts peer groups defined by the window ordering rather than physical rows or value distance. It therefore needs its own canonical unit instead of being mapped to ROWS or RANGE.
Scope
- Add
WindowFrameUnits::Groups to the canonical IR.
- Preserve DataFusion
GROUPS start/end bounds, including finite, current-row, and unbounded bounds.
- Thread the new unit through serialization, resolution, CSE hashing, and DAG export.
- Replace the current rejection test with positive lowering coverage.
Acceptance criteria
GROUPS BETWEEN 2 PRECEDING AND CURRENT ROW lowers without UnsupportedFeature.
- The resulting
SQLWindowFunc.frame is structurally distinct from equivalent-looking ROWS and RANGE frames.
- Serialization and CSE preserve the unit.
- Tests cover finite and unbounded
GROUPS bounds.
Post-ASAP execution of window frames is separate follow-up work; this issue is about lossless canonical representation and lowering.
Related
Summary
PR #270 adds first-class window-frame data to
SQLWindowFunc, but intentionally supports onlyROWSandRANGE. DataFusion 43 also resolvesGROUPSframes;lower_window_framecurrently rejectsWindowFrameUnits::GroupswithUnsupportedFeature.GROUPScounts peer groups defined by the window ordering rather than physical rows or value distance. It therefore needs its own canonical unit instead of being mapped toROWSorRANGE.Scope
WindowFrameUnits::Groupsto the canonical IR.GROUPSstart/end bounds, including finite, current-row, and unbounded bounds.Acceptance criteria
GROUPS BETWEEN 2 PRECEDING AND CURRENT ROWlowers withoutUnsupportedFeature.SQLWindowFunc.frameis structurally distinct from equivalent-lookingROWSandRANGEframes.GROUPSbounds.Post-ASAP execution of window frames is separate follow-up work; this issue is about lossless canonical representation and lowering.
Related