Repository navigation
Support equality with one in opt-in WindowTopN rule - #26160
Open
osipovartem wants to merge 1 commit into
Open
osipovartem wants to merge 1 commit into
osipovartem wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #26160 +/- ##
==========================================
- Coverage 82.77% 82.77% -0.01%
==========================================
Files 1147 1147
Lines 450909 450930 +21
Branches 450909 450930 +21
==========================================
+ Hits 373252 373264 +12
- Misses 54934 54938 +4
- Partials 22723 22728 +5 ☔ 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.
What changes
rank_col = 1and1 = rank_colin the opt-in WindowTopN rule. Other equalities remain untouched.enable_window_topndisabled by default.Validation
cargo +stable test --profile ci -p datafusion-sqllogictest --test sqllogictests -- window_topn.slt --test-threads 1cargo +stable test --profile ci -p datafusion-physical-optimizer --lib(38 passed)cargo +stable clippy --profile ci -p datafusion-physical-optimizer --all-targets -- -D warningscargo +stable fmt --all --checkPerformance scope
Five local synthetic 100k-row runs (median query elapsed): 100 groups, rule off/on 31/18 ms; 90k groups, rule off/on 120/140 ms. High-cardinality plans can regress, which is why this remains opt-in. These numbers are not a Snowplow benchmark. A pushed-down FilterExec projection can also prevent this rewrite. This PR does not change either behavior.