-
Notifications
You must be signed in to change notification settings - Fork 752
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
query(fuse): limit push down respect orders #4818
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/databend/databend/4gHYNRusoCX7YrVaUh6n3AhUuEaU |
Thanks for the contribution! Please review the labels and make any necessary changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
That’s cool |
.as_ref() | ||
.and_then(|p| p.limit) | ||
.unwrap_or(usize::MAX); | ||
let mut limit = usize::MAX; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
let limit = push_downs
.as_ref()
.filter(|p| p.order_by.is_empty())
.and_then(|p| p.limit)
.unwrap_or(usize::MAX);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
let limit = push_downs .as_ref() .filter(|p| p.order_by.is_empty()) .and_then(|p| p.limit) .unwrap_or(usize::MAX);
That's great, I did not come up with this idea.
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
Summary about this PR
Changelog
Related Issues
Fixes #4807