-
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: make IndexHashJoin support keeping the outer order #12349
Conversation
/rebuild |
6346ffe
to
b1d6d7e
Compare
Codecov Report
@@ Coverage Diff @@
## master #12349 +/- ##
===========================================
Coverage ? 80.0544%
===========================================
Files ? 462
Lines ? 105753
Branches ? 0
===========================================
Hits ? 84660
Misses ? 14780
Partials ? 6313 |
/rebuild |
9ff5f38
to
4c6a7c6
Compare
/run-all-tests |
PTAL @SunRunAway @qw4990 |
1 similar comment
PTAL @SunRunAway @qw4990 |
/run-all-tests |
executor/index_lookup_hash_join.go
Outdated
@@ -482,3 +614,77 @@ func (iw *indexHashJoinInnerWorker) joinMatchedInnerRow2Chunk(ctx context.Contex | |||
} | |||
return true, joinResult | |||
} | |||
|
|||
func (iw *indexHashJoinInnerWorker) collectMatchedInnerPtrs4OuterRows(ctx context.Context, innerRow chunk.Row, innerRowPtr chunk.RowPtr, task *indexHashJoinTask, | |||
joinResult *indexHashJoinResult, h hash.Hash64, buf []byte) error { |
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.
joinResult
is not used in this function.
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
/run-all-tests |
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
Your auto merge job has been accepted, waiting for 12773 |
/run-all-tests |
@XuHuaiyu merge failed. |
/run-integration-common-test |
NOTE:
For testing the correctness, I change the execution logic that IndexJoin and IndexMergeJoin both execute IndexHashJoin actually.
What problem does this PR solve?
Make the IndexHashJoin support keeping the result as the outer order.
What is changed and how it works?
Add a keepOuterOrder attribute for IndexHashJoin, outerWorker, and IndexHashJoinTask, when keepOuterOrder is true, a task will be sent to the channels maintained in the main thread and inner workers separately. And the result will be fetched from task.resultCh one by one.
Check List
Tests
Exists tests.
Code changes
Side effects
N/A
Related changes
N/A
Release note
N/A