-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
executor: do not reorder handles when building requests for IndexMergeJoin
#20138
Conversation
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
I don't know why |
LGTM |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
@qw4990 merge failed. |
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
@qw4990 merge failed. |
/run-all-tests |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #20147 |
What problem does this PR solve?
Issue Number: close #20137
Problem Summary: executor: do not reorder handles when building requests for
IndexMergeJoin
What is changed and how it works?
Reordering handles when building requests is for merging successive handles into one, for example
h in (2, 3, 1)
can be merged to(h>=1 and h<=3)
, which may improve the performance.But some handles may overflow, after reordering, they cannot keep the original order.
IndexMergeJoin
requires all rows returned in a specific order, so reordering handles may break this.To avoid this risk, do not reorder handles when building requests for
IndexMergeJoin
.Check List
Tests
Release note
IndexMergeJoin