-
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
planner: introduce an individual physical plan for indexNestedLoopHashJoin #12139
Conversation
1ce114c
to
0538aa3
Compare
Codecov Report
@@ Coverage Diff @@
## master #12139 +/- ##
===========================================
Coverage 81.3278% 81.3278%
===========================================
Files 454 454
Lines 100449 100449
===========================================
Hits 81693 81693
Misses 12941 12941
Partials 5815 5815 |
7441627
to
558eaa3
Compare
dc2617f
to
5a990cd
Compare
5a990cd
to
cc202d0
Compare
path *accessPath, | ||
compareFilters *ColWithCmpFuncManager, | ||
) []PhysicalPlan { | ||
// TODO(xuhuaiyu): support keep outer order for indexHashJoin. |
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.
Do we need it? I thought in this case index merge join would always performs better.
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.
Some cases need to keep order but index merge join can't make it. For example:
We need to join tables t1
and t2
on t1.c = t2.c
, t1
is the outer table. But it requires to keep order with t1.a, t1.b
. The index merge join can only make sure of keeping t1.c
order.
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.
That's the reason why we also need index lookup join now.
path *accessPath, | ||
compareFilters *ColWithCmpFuncManager, | ||
) []PhysicalPlan { | ||
// TODO(xuhuaiyu): support keep outer order for indexHashJoin. |
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.
Some cases need to keep order but index merge join can't make it. For example:
We need to join tables t1
and t2
on t1.c = t2.c
, t1
is the outer table. But it requires to keep order with t1.a, t1.b
. The index merge join can only make sure of keeping t1.c
order.
path *accessPath, | ||
compareFilters *ColWithCmpFuncManager, | ||
) []PhysicalPlan { | ||
// TODO(xuhuaiyu): support keep outer order for indexHashJoin. |
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.
That's the reason why we also need index lookup join now.
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
…ashjoin_outer_order
/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 12239 |
/run-all-tests |
I'll split this PR into small ones:
What problem does this PR solve?
Introduce an individual physical plan for IndexNestedLoopHashJoin.
What is changed and how it works?
PhysicalIndexHashJoin will be constructed when
len(prop.Item) == 0
is true.Check List
Tests
Exists tests.
Code changes
Side effects
Related changes
N/A
Release note
N/A