-
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
planner: remove correlated column sort items (#9435) #9440
Merged
zz-jason
merged 3 commits into
pingcap:release-2.1
from
zz-jason:cherrypick/2.1-order-by-correlated-column
Feb 25, 2019
Merged
planner: remove correlated column sort items (#9435) #9440
zz-jason
merged 3 commits into
pingcap:release-2.1
from
zz-jason:cherrypick/2.1-order-by-correlated-column
Feb 25, 2019
Conversation
This file contains 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
zz-jason
added
type/bugfix
This PR fixes a bug.
sig/planner
SIG: Planner
type/2.1 cherry-pick
labels
Feb 25, 2019
/run-all-tests tikv=release-2.1 pd=release-2.1 tidb-test=release-2.1 |
2019/02/25 14:55:34.434 main.go:688: [fatal] run test [topn_push_down] err: sql:desc select * from t1 where t1.a in (select t2.a as a from t2 where t2.b > t1.b order by t1.b limit 1);: run "desc select * from t1 where t1.a in (select t2.a as a from t2 where t2.b > t1.b order by t1.b limit 1);" at line 183 err, we need:
desc select * from t1 where t1.a in (select t2.a as a from t2 where t2.b > t1.b order by t1.b limit 1);
id count task operator info
Apply_15 9990.00 root semi join, inner:Selection_19, equal:[eq(test.t1.a, test.t2.a)]
├─TableReader_18 9990.00 root data:Selection_17
│ └─Selection_17 9990.00 cop not(isnull(test.t1.a))
│ └─TableScan_16 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo
└─Selection_19 0.80 root not(isnull(test.t2.a))
└─Limit_20 1.00 root offset:0, count:1
└─TableReader_26 1.00 root data:Limit_25
└─Limit_25 1.00 cop offset:0, count:1
└─Selection_24 1.00 cop
but got:
desc select * from t1 where t1.a in (select t2.a as a from t2 where t2.b > t1.b order by t1.b limit 1);
id count task operator info
Apply_14 10000.00 root semi join, inner:Limit_17, equal:[eq(test.t1.a, test.t2.a)]
├─TableReader_16 10000.00 root data:TableScan_15
│ └─TableScan_15 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo
└─Limit_17 1.00 root offset:0, count:1
└─TableReader_23 1.00 root data:Limit_22
└─Limit_22 1.00 cop offset:0, count:1
└─Selection_21 1.00 cop gt(test.t2.b, test.t1.b)
└─TableScan_20 1.25 cop table:t2, range:[-inf,+inf], keep order:false, stats:pseudo
|
/run-all-tests tikv=release-2.1 pd=release-2.1 tidb-test=release-2.1 |
XuHuaiyu
reviewed
Feb 25, 2019
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
zz-jason
requested review from
XuHuaiyu and
eurekaka
and removed request for
XuHuaiyu
February 25, 2019 08:06
zz-jason
added
status/LGT1
Indicates that a PR has LGTM 1.
status/all tests passed
labels
Feb 25, 2019
alivxxx
approved these changes
Feb 25, 2019
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
alivxxx
added
status/LGT2
Indicates that a PR has LGTM 2.
and removed
status/LGT1
Indicates that a PR has LGTM 1.
labels
Feb 25, 2019
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/bugfix
This PR fixes a bug.
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.
cherry pick #9435 to release 2.1