-
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: tiny code refine for contructIndexJoin #12254
Conversation
…code_4_indexjoin
/run-all-tests |
…code_4_indexjoin
Codecov Report
@@ Coverage Diff @@
## master #12254 +/- ##
=========================================
Coverage 81.191% 81.191%
=========================================
Files 454 454
Lines 99176 99176
=========================================
Hits 80522 80522
Misses 12883 12883
Partials 5771 5771 |
return rightJoins, true | ||
} | ||
|
||
if leftJoins != nil && lhsCardinality < rhsCardinality { |
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 remove this heuristic rule actually? Previously, cost of index join computed only depends on row count of outer child, then this rule can hold, but now we have changed the cost computation of index join to consider inner row count as well, so it would not always be better if outer row count is smaller?
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.
Should we make this change in an individual PR?
This PR only refines the code structure.
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.
Sure.
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
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 |
What problem does this PR solve?
Tiny code refine for contructIndexJoin
What is changed and how it works?
Extract 2 functions:
buildIndexJoinInner2TableScan
buildIndexJoinInner2IndexScan
Check List
Tests
Exists tests.
Code changes
N/A
Side effects
N/A
Related changes
N/A
Release note
N/A