| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Codecov Report❌ Patch coverage is 99.21260% with 1 line in your changes missing coverage. Please review.
@@ Coverage Diff @@
## feat/spill #378 +/- ##
==============================================
- Coverage 92.91% 92.90% -0.01%
==============================================
Files 253 253
Lines 43141 43190 +49
==============================================
+ Hits 40084 40126 +42
- Misses 3057 3064 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What problem does this PR solve?
Issue link:
Window execution currently performs its own in-memory sort and materializes the full input. This couples Window to one sorting implementation and prevents the existing spill-backed ExternalSort from satisfying Window ordering.
What is changed and how it works?
Window now consumes explicitly sorted input instead of sorting internally. The binder inserts a Sort on PARTITION BY + ORDER BY; native builds with the spill feature therefore use the existing ExternalSort executor, while non-spill and WASM builds continue to use the in-memory Sort implementation.
The Window executor processes ordered input incrementally and retains only the rows required by the current function set: one row, one peer group, or one partition. Partition and peer boundaries are detected from cached sort values, and a single pending row carries a boundary across buffered output.
Code changes
Check List
Tests
Window unit coverage verifies row-, peer-, and partition-retention behavior. SQL logic coverage verifies ranking, aggregate windows, multiple window groups, partition boundaries, peer ties, views, and explain output. The spill-enabled build also compiles successfully.
Side effects
Note for reviewer
The primary goal is to decouple Window from Sort. Window only requires ordered input; with spill enabled, the existing Sort execution path selects ExternalSort and provides spill support without adding spill-specific code to Window.
The repository-wide clippy target remains blocked by pre-existing warnings outside this change: an unused parser import, unused optimizer pattern/matcher code, and manual_is_multiple_of in the existing ExternalSort test.