planner: fix bugs and make it more effective in outer join elimination rule.#11160
Merged
lzmhhh123 merged 18 commits intoJul 23, 2019
Merged
Conversation
Member
|
You can change to Like what projection did when meet column prune and predicate push down. Also, don't use projection's schema directly. Use its expression to substitute the columns in schema instead. |
Codecov Report
@@ Coverage Diff @@
## master #11160 +/- ##
===============================================
- Coverage 81.4843% 81.276% -0.2084%
===============================================
Files 423 423
Lines 91285 90125 -1160
===============================================
- Hits 74383 73250 -1133
+ Misses 11603 11576 -27
Partials 5299 5299 |
e578d29 to
c076c0f
Compare
winoros
reviewed
Jul 11, 2019
659b996 to
b79feca
Compare
b79feca to
f336f2d
Compare
winoros
reviewed
Jul 12, 2019
alivxxx
reviewed
Jul 12, 2019
Contributor
Author
|
PTAL. @winoros @lamxTyler |
Contributor
Author
|
/run-all-tests |
alivxxx
reviewed
Jul 15, 2019
zz-jason
reviewed
Jul 15, 2019
winoros
reviewed
Jul 19, 2019
| github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= | ||
| github.com/chzyer/readline v0.0.0-20171208011716-f6d7a1f6fbf3/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= | ||
| github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= | ||
| github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= |
Member
There was a problem hiding this comment.
I think it's not expected change?
Member
There was a problem hiding this comment.
@lzmhhh123 you can use make tidy to clean up the go.sum
Contributor
Author
There was a problem hiding this comment.
That's the result with make tidy. ╮(╯_╰)╭
Contributor
Author
|
PTAL. @zz-jason |
alivxxx
reviewed
Jul 23, 2019
alivxxx
reviewed
Jul 23, 2019
Contributor
Author
|
/run-all-tests |
Contributor
|
cherry pick to release-2.1 failed |
Contributor
|
cherry pick to release-3.0 failed |
lzmhhh123
added a commit
to lzmhhh123/tidb
that referenced
this pull request
Jul 26, 2019
…origin-release-3.0
eurekaka
added a commit
to lzmhhh123/tidb
that referenced
this pull request
Jul 28, 2019
…origin-release-3.0
zz-jason
added a commit
to lzmhhh123/tidb
that referenced
this pull request
Jul 29, 2019
…origin-release-3.0
sre-bot
added a commit
to lzmhhh123/tidb
that referenced
this pull request
Jul 29, 2019
…origin-release-3.0
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.
What problem does this PR solve?
Now, the rule outer join elimination keeps a bug as the following cases:
It can't regard the alias column as the same as origin column. After this PR, this case of outer join can be normally eliminated.
Other enhancements and bugs fix are referred to issue: #9536, #11167
What is changed and how it works?
Use
col.OrigColNameinstead ofcol.ColName. Record columns inschemabetweenLogicalAggregationandLogicalJoin. Substitue columns forLogicalProjectionandLogicalSelection.Check List
Tests
Related changes