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/core: push selection operator to mpp task #22343

Merged
merged 3 commits into from
Jan 11, 2021

Conversation

hanfei1991
Copy link
Member

What problem does this PR solve?

Problem Summary:
In TiDB, selection can not appear above a operator except table scan. But in Mpp mode, that's not the case any more.

What is changed and how it works?

What's Changed:
In attack 2 task phase, selection can be attached to MPP part

Check List

Tests

  • Unit test (e2e)

Side effects

None

Release note

  • push selection operator to mpp task

@hanfei1991 hanfei1991 requested a review from a team as a code owner January 11, 2021 08:38
@hanfei1991 hanfei1991 requested review from eurekaka and removed request for a team January 11, 2021 08:38
Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 11, 2021
@hanfei1991 hanfei1991 added the type/enhancement The issue or PR belongs to an enhancement. label Jan 11, 2021
@XuHuaiyu XuHuaiyu added the sig/planner SIG: Planner label Jan 11, 2021
Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Jan 11, 2021
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Jan 11, 2021
@hanfei1991
Copy link
Member Author

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 11, 2021
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit dae6e49 into pingcap:master Jan 11, 2021
@hanfei1991 hanfei1991 deleted the hanfei/push-sel-mpp branch January 11, 2021 09:53
if mppTask, _ := tasks[0].(*mppTask); mppTask != nil { // always push to mpp task.
sc := sel.ctx.GetSessionVars().StmtCtx
if expression.CanExprsPushDown(sc, sel.Conditions, sel.ctx.GetClient(), kv.TiFlash) {
return attachPlan2Task(sel, mppTask.copy())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add cost?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/planner SIG: Planner status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants