-
Notifications
You must be signed in to change notification settings - Fork 6k
planner: inherit the index join info and stats bottom-up for index join inner side #61148
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
Signed-off-by: AilinKid <[email protected]>
Hi @AilinKid. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@@ -1215,7 +1215,7 @@ func buildDataSource2IndexScanByIndexJoinProp( | |||
// here we don't need to construct physical index join here anymore, because we will encapsulate it bottom-up. | |||
// chosenPath and lastColManager of indexJoinResult should be returned to the caller (seen by index join to keep | |||
// index join aware of indexColLens and compareFilters). | |||
completeIndexJoinFeedBackInfo(innerTask.(*CopTask), indexJoinResult, indexJoinResult.chosenRanges.Range(), keyOff2IdxOff) | |||
completeIndexJoinFeedBackInfo(innerTask.(*CopTask), indexJoinResult, indexJoinResult.chosenRanges, keyOff2IdxOff) |
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 is just a param passing mistake made before. just fix it
Signed-off-by: AilinKid <[email protected]>
@@ -2157,6 +2157,13 @@ func tryToGetIndexJoin(p *logicalop.LogicalJoin, prop *property.PhysicalProperty | |||
return filterIndexJoinBySessionVars(p.SCtx(), candidates), false | |||
} | |||
|
|||
func enumerationContainIndexJoin(candidates []base.PhysicalPlan) bool { |
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.
used in next pr (the final one)
Signed-off-by: AilinKid <[email protected]>
Co-authored-by: Weizhen Wang <[email protected]>
/ok-to-test |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #61148 +/- ##
================================================
+ Coverage 73.1619% 73.6530% +0.4910%
================================================
Files 1724 1724
Lines 477379 477684 +305
================================================
+ Hits 349260 351829 +2569
+ Misses 106687 104466 -2221
+ Partials 21432 21389 -43
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hawkingrei, qw4990 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
What problem does this PR solve?
Issue Number: ref #60106 close #60276
Problem Summary:
What changed and how does it work?
It inherits some stats from the index join inside underlying datasource, which is the problem we have been talking about --- some index join's inner side operator's est row count may be greater the underlying ds and this is because this operator didn't adjust it estimation according to the avgInnerCount as the ds does. So this pr is essentially to directly inherit and keep the alignment with the undelrying rowcount, as long as it is found to be the index join inside end. Also there are some tasks warnings collection work. Generally speaking, the tasks copy() and convertToRoot() basically cover most of the situations, but for some task new mannually, we need to manually inherit warnings. Here is a supplement.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.