support hash join in new plan#1234
Merged
hanfei19910905 merged 10 commits intomasterfrom May 19, 2016
Merged
Conversation
optimizer/plan/new_plans.go
Outdated
| @@ -0,0 +1,45 @@ | |||
| // Copyright 2015 PingCAP, Inc. | |||
Member
|
You can add a function in So you will never forget to call one of them. |
| if sel.From != nil { | ||
| p = b.buildNewSinglePathPlan(sel.From.TableRefs) | ||
| if sel.Where != nil { | ||
| p = b.buildFilter(p, sel.Where) |
Member
There was a problem hiding this comment.
If where is all pushed down, this would be redundant?
Author
There was a problem hiding this comment.
we build filter first and then apply predicate pushing down. when finishing it, this filter can be removed.
optimizer/plan/newplanbuilder.go
Outdated
| } | ||
|
|
||
| func (ce *columnsExtractor) Leave(expr ast.Node) (ret ast.Node, ok bool) { | ||
| return expr, false |
ec90efb to
4915b5b
Compare
Member
|
Add a simple benchmark for join like: https://github.com/pingcap/tidb/blob/master/bench_test.go#L160 |
executor/builder.go
Outdated
| case plan.LeftOuterJoin: | ||
| e.outter = true | ||
| e.leftSmall = false | ||
| big, small = 0, 1 |
Member
There was a problem hiding this comment.
What's this 0 and 1 mean? Please add comment or use const.
Member
There was a problem hiding this comment.
e.leftSmall is enough for deciding which child will be used for smallExec. So big/small is redundant.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
support hash join