Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(optimizer): support m <= rank AND rank <= n #6384

Merged
merged 6 commits into from
Nov 19, 2022

Conversation

xxchan
Copy link
Member

@xxchan xxchan commented Nov 16, 2022

I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.

What's changed and what's your intention?

close #5692

Mainly works for ROW_NUMBER().

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

@codecov
Copy link

codecov bot commented Nov 16, 2022

Codecov Report

Merging #6384 (61c112c) into main (33475dd) will decrease coverage by 0.00%.
The diff coverage is 82.19%.

@@            Coverage Diff             @@
##             main    #6384      +/-   ##
==========================================
- Coverage   73.94%   73.93%   -0.01%     
==========================================
  Files         981      981              
  Lines      159133   159159      +26     
==========================================
+ Hits       117665   117679      +14     
- Misses      41468    41480      +12     
Flag Coverage Δ
rust 73.93% <82.19%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rc/frontend/src/optimizer/rule/over_agg_to_topn.rs 88.61% <79.03%> (-6.01%) ⬇️
src/storage/src/hummock/sstable/multi_builder.rs 97.17% <100.00%> (-0.04%) ⬇️
src/batch/src/executor/group_top_n.rs 68.42% <0.00%> (-6.44%) ⬇️
...frontend/src/scheduler/hummock_snapshot_manager.rs 58.79% <0.00%> (+0.50%) ⬆️
src/frontend/src/expr/mod.rs 80.21% <0.00%> (+1.48%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@chenzl25 chenzl25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. BTW, between is also some kind of range.

Copy link
Member

@fuyufjh fuyufjh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for rest.

@xxchan xxchan force-pushed the xxchan/conceptual-wallaby branch from 0dbac57 to f3ed989 Compare November 19, 2022 19:41
@xxchan
Copy link
Member Author

xxchan commented Nov 19, 2022

between is also some kind of range.

between is bound to <= AND >=, so it's already supported. Added a test case.

@mergify mergify bot merged commit 709e1be into main Nov 19, 2022
@mergify mergify bot deleted the xxchan/conceptual-wallaby branch November 19, 2022 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

optimizer: Support rank > M AND rank < N for Grouping TopN
3 participants