-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix: limit is missing after removing SPM #14569
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
Conversation
]; | ||
let expected_optimized = [ | ||
"SortPreservingMergeExec: [non_nullable_col@1 ASC], fetch=100", | ||
" SortExec: expr=[non_nullable_col@1 ASC], preserve_partitioning=[false]", |
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.
I am wandering do we expect to optimize only sortExec with Topk(fetch) for the only one partition case?
dc76129
to
12cd613
Compare
"LocalLimitExec: fetch=100", | ||
" SortExec: expr=[non_nullable_col@1 ASC], preserve_partitioning=[false]", |
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.
we should optimize such pattern to topk later
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.
This makes sense to me -- thank you @xudong963
In general it seems like we have a class of bugs related to removing fetch
-- maybe we should re-evaluate enforce_sorting
for a more holistic fix if we find any more issues
yes, I also have the thought, |
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 now, thanks @xudong963 !
Thanks all, let's go! |
* Fix: limit is missing after removing SPM * fix test * use limitexec
Rationale for this change
It's clear that fetch will miss after removing SPM
What changes are included in this PR?
If SPM is with fetch, we won't remove it.
Are these changes tested?
Yes, ut
Are there any user-facing changes?
No