Repository navigation
fix: Respect NULLS FIRST/LAST in a window's ORDER BY - #29159
Merged
Merged
Conversation
`parse_order_by_in_window` only returned the sort direction, so the null placement given in an `OVER (ORDER BY ...)` clause was dropped. It now returns full `SortOptions` and rejects mixed NULLS FIRST/LAST ordering the same way mixed asc/desc is rejected. The per-key defaulting rule (nulls last for ASC, nulls first for DESC) was spelled out inline at four sites across `context.rs` and `functions.rs`; it now lives in one `order_by_sort_options` helper that they all call. Fixes #29151 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jg2Z9Ao8UhwqJ5R1UkSosy
ritchie46
requested review from
MarcoGorelli,
alexander-beedie,
c-peters and
orlp
as code owners
September 4, 2026 14:33
Contributor
|
The uncompressed lib size after this PR is 54.7291 MB (at |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #29159 +/- ##
==========================================
+ Coverage 81.65% 81.68% +0.02%
==========================================
Files 1905 1905
Lines 270933 270967 +34
Branches 3105 3105
==========================================
+ Hits 221242 221344 +102
+ Misses 48906 48840 -66
+ Partials 785 783 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes: #29151
🤖 Generated with Claude Code