-
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
plan: always chose the smaller child as outer for IndexJoin #7019
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
plan/exhaust_physical_plans.go
Outdated
return join, true | ||
} | ||
plans = append(plans, join...) | ||
lhsCardinality := p.Children()[0].cardinality() |
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.
Merge master and you can use p.Childrend()[0].StatsInfo().Count()
now.
plan/exhaust_physical_plans.go
Outdated
} | ||
plans = append(plans, join...) | ||
lhsCardinality := p.Children()[0].cardinality() | ||
rhsCardinality := p.Children()[1].cardinality() |
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.
ditto
plan/plan.go
Outdated
@@ -184,6 +184,8 @@ type LogicalPlan interface { | |||
// deriveStats derives statistic info between plans. | |||
deriveStats() (*statsInfo, error) | |||
|
|||
cardinality() float64 |
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 don't need this.
@winoros PTAL |
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
@XuHuaiyu PTAL |
/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
What have you changed? (mandatory)
cherry pick #6996 to master
What are the type of the changes (mandatory)?
How has this PR been tested (mandatory)?