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: fix aggregation hint didn't work in some cases #11996

Merged
merged 3 commits into from
Sep 4, 2019

Conversation

foreyes
Copy link
Contributor

@foreyes foreyes commented Sep 3, 2019

What problem does this PR solve?

Sql aggregation hint didn't work in some cases, they will be fixed after this PR.

What is changed and how it works?

Before this PR, we only set preferAggType when buildAggregation, but logical aggregation will also be generated in buildDistinct, aggregation push down and expression rewriter.

This PR set necessary preferAggType into logical aggregation.

Check List

Tests

  • Unit test

Code changes

  • None

Side effects

  • None

Related changes

  • None

Release note

  • Fixed the bug that aggregation hints did not work in some cases.

@foreyes foreyes added sig/planner SIG: Planner type/bug The issue is confirmed as a bug. labels Sep 3, 2019
@foreyes foreyes self-assigned this Sep 3, 2019
@codecov
Copy link

codecov bot commented Sep 3, 2019

Codecov Report

Merging #11996 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #11996   +/-   ##
===========================================
  Coverage   81.6173%   81.6173%           
===========================================
  Files           446        446           
  Lines         96553      96553           
===========================================
  Hits          78804      78804           
  Misses        12243      12243           
  Partials       5506       5506

@foreyes
Copy link
Contributor Author

foreyes commented Sep 3, 2019

/run-all-tests

@foreyes
Copy link
Contributor Author

foreyes commented Sep 3, 2019

PTAL. @lzmhhh123 @eurekaka

Copy link
Contributor

@eurekaka eurekaka left a comment

Choose a reason for hiding this comment

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

LGTM

@eurekaka eurekaka added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 3, 2019
Copy link
Contributor

@lzmhhh123 lzmhhh123 left a comment

Choose a reason for hiding this comment

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

LGTM.

@lzmhhh123 lzmhhh123 added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 4, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Sep 4, 2019

Your auto merge job has been accepted, waiting for #12012

@sre-bot
Copy link
Contributor

sre-bot commented Sep 4, 2019

/run-all-tests

@sre-bot sre-bot merged commit 0872b65 into pingcap:master Sep 4, 2019
@foreyes foreyes deleted the dev/fix_agg_hint branch September 16, 2019 03:52
foreyes added a commit to foreyes/tidb that referenced this pull request Sep 16, 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/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants