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/cascades: add transformation rule TransformLimitToTableDual #14430

Merged
merged 19 commits into from Jan 11, 2020

Conversation

@SeaRise
Copy link
Contributor

SeaRise commented Jan 9, 2020

What problem does this PR solve?

This PR adds Transformation rule TransformLimitToTableDual which is a part of limit in cascades planner(#13709).

What is changed and how it works?

add a transformation rule TransformLimitToTableDual.This rule tries to convert limit to tableDual

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change
SeaRise and others added 16 commits Dec 31, 2019
更新
update
@SeaRise SeaRise requested a review from pingcap/co-planner as a code owner Jan 9, 2020
@sre-bot sre-bot added the contribution label Jan 9, 2020
@pull-assigner pull-assigner bot requested review from eurekaka and francis0407 and removed request for pingcap/co-planner Jan 9, 2020
@francis0407 francis0407 added this to In progress in cascades planner via automation Jan 9, 2020
Copy link
Contributor

francis0407 left a comment

LGTM.

Please run go fmt in the cascades package.

tableDual := plannercore.LogicalTableDual{RowCount: 0}.Init(limit.SCtx(), limit.SelectBlockOffset())
tableDual.SetSchema(old.GetExpr().Schema())
tableDualExpr := memo.NewGroupExpr(tableDual)
return []*memo.GroupExpr{tableDualExpr}, true, true, nil

This comment has been minimized.

Copy link
@lzmhhh123

lzmhhh123 Jan 10, 2020

Member

Should we eraseAll here? Please add test like

select * from t as t1 left join (select * from t limit 0) as t2 on t1.a = t2.a;
Copy link
Member

zz-jason left a comment

LGTM

cascades planner automation moved this from In progress to Reviewer approved Jan 11, 2020
@sre-bot

This comment has been minimized.

Copy link

sre-bot commented Jan 11, 2020

/run-all-tests

@sre-bot sre-bot merged commit 5c87440 into pingcap:master Jan 11, 2020
15 checks passed
15 checks passed
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/build_check_race Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev_2 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-copr-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
idc-jenkins-ci-tidb/wasm-build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details
cascades planner automation moved this from Reviewer approved to Done Jan 11, 2020
@SeaRise SeaRise deleted the SeaRise:TransformLimitToTableDual branch Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
5 participants
You can’t perform that action at this time.