Skip to content
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

Merged
merged 8 commits into from
Jul 31, 2018

Conversation

zz-jason
Copy link
Member

@zz-jason zz-jason commented Jul 9, 2018

What have you changed? (mandatory)

cherry pick #6996 to master

What are the type of the changes (mandatory)?

  • Improvement (non-breaking change which is an improvement to an existing feature)

How has this PR been tested (mandatory)?

  • unit test

@zz-jason zz-jason added type/enhancement The issue or PR belongs to an enhancement. status/WIP sig/planner SIG: Planner labels Jul 9, 2018
Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return join, true
}
plans = append(plans, join...)
lhsCardinality := p.Children()[0].cardinality()
Copy link
Member

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.

}
plans = append(plans, join...)
lhsCardinality := p.Children()[0].cardinality()
rhsCardinality := p.Children()[1].cardinality()
Copy link
Member

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
Copy link
Member

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.

@zz-jason
Copy link
Member Author

@winoros PTAL

Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@zz-jason
Copy link
Member Author

@XuHuaiyu PTAL

@zz-jason
Copy link
Member Author

/run-all-tests

Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. status/all tests passed labels Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/planner SIG: Planner status/LGT2 Indicates that a PR has LGTM 2. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants