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

planner: remove correlated column sort items (#9435) #9440

Conversation

Projects
None yet
3 participants
@zz-jason
Copy link
Member

zz-jason commented Feb 25, 2019

cherry pick #9435 to release 2.1

@zz-jason

This comment has been minimized.

Copy link
Member Author

zz-jason commented Feb 25, 2019

/run-all-tests tikv=release-2.1 pd=release-2.1 tidb-test=release-2.1

@XuHuaiyu

This comment has been minimized.

Copy link
Contributor

XuHuaiyu commented Feb 25, 2019

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

zz-jason added some commits Feb 25, 2019

@zz-jason

This comment has been minimized.

Copy link
Member Author

zz-jason commented Feb 25, 2019

/run-all-tests tikv=release-2.1 pd=release-2.1 tidb-test=release-2.1

@XuHuaiyu
Copy link
Contributor

XuHuaiyu left a comment

LGTM

@zz-jason zz-jason requested review from XuHuaiyu and eurekaka and removed request for XuHuaiyu Feb 25, 2019

@zz-jason zz-jason requested review from lamxTyler and winoros Feb 25, 2019

@lamxTyler
Copy link
Member

lamxTyler left a comment

LGTM

@lamxTyler lamxTyler added status/LGT2 and removed status/LGT1 labels Feb 25, 2019

@zz-jason zz-jason merged commit db48da2 into pingcap:release-2.1 Feb 25, 2019

13 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/common-test job succeeded
Details
idc-jenkins-ci-tidb/integration-common-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-compatibility-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-ddl-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/mybatis-test job succeeded
Details
idc-jenkins-ci-tidb/sqllogic-test-1 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/sqllogic-test-2 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/unit-test Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@zz-jason zz-jason deleted the zz-jason:cherrypick/2.1-order-by-correlated-column branch Feb 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.