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: stream agg should not be pushed to double read #12443

Merged
merged 6 commits into from
Oct 12, 2019

Conversation

winoros
Copy link
Member

@winoros winoros commented Sep 27, 2019

What problem does this PR solve?

For the following two reason, we should not push stream agg down to double read

  • The aggregate will lost the handle information
  • There's no sort operator. The second read is ordered with pk, not by index.

What is changed and how it works?

Disable it.

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

Release note

  • Write release note for bug-fix or new feature.

} else {
partialAgg.SetChildren(cop.indexPlan)
cop.indexPlan = partialAgg
if cop.extraHandleCol == nil {
Copy link
Member

Choose a reason for hiding this comment

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

Could you please add a comment here to explain the reason? I think it may be hard to understand without this PR's description.

Copy link
Member Author

Choose a reason for hiding this comment

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

added.

@codecov
Copy link

codecov bot commented Sep 27, 2019

Codecov Report

Merging #12443 into master will decrease coverage by 0.2146%.
The diff coverage is 81.8181%.

@@               Coverage Diff                @@
##             master     #12443        +/-   ##
================================================
- Coverage   79.8628%   79.6481%   -0.2147%     
================================================
  Files           461        461                
  Lines        103803     101465      -2338     
================================================
- Hits          82900      80815      -2085     
- Misses        14813      14827        +14     
+ Partials       6090       5823       -267

@francis0407
Copy link
Member

Please fix the explain tests.

@winoros winoros added sig/planner SIG: Planner type/bugfix This PR fixes a bug. labels Sep 29, 2019
planner/core/task.go Outdated Show resolved Hide resolved
Co-Authored-By: Zhuomin(Charming) Liu <lzmhhh123@gmail.com>
Copy link
Contributor

@alivxxx alivxxx left a comment

Choose a reason for hiding this comment

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

LGTM

@francis0407
Copy link
Member

/run-all-tests

@francis0407
Copy link
Member

LGTM

@francis0407 francis0407 added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. labels Oct 12, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Oct 12, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Oct 12, 2019

@winoros merge failed.

@francis0407
Copy link
Member

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Oct 12, 2019

/run-all-tests

@winoros winoros merged commit 45bc789 into pingcap:master Oct 12, 2019
@winoros winoros deleted the fix-issue12416 branch October 12, 2019 11:22
@sre-bot
Copy link
Contributor

sre-bot commented Oct 12, 2019

cherry pick to release-2.1 failed

@sre-bot
Copy link
Contributor

sre-bot commented Oct 12, 2019

cherry pick to release-3.1 failed

@sre-bot
Copy link
Contributor

sre-bot commented Oct 12, 2019

cherry pick to release-3.0 failed

winoros added a commit to winoros/tidb that referenced this pull request Oct 14, 2019
For the following two reason, we should not push stream agg down to double read
- The aggregate will lost the handle information
- There's no sort operator. The second read is ordered with pk, not by index.
XiaTianliang pushed a commit to XiaTianliang/tidb that referenced this pull request Dec 21, 2019
For the following two reason, we should not push stream agg down to double read
- The aggregate will lost the handle information
- There's no sort operator. The second read is ordered with pk, not by index.
@sre-bot
Copy link
Contributor

sre-bot commented Apr 7, 2020

It seems that, not for sure, we failed to cherry-pick this commit to release-2.1. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @winoros PTAL.

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/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants