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 different err msg from MySQL when gro ... (#16134) #16165

Merged
merged 8 commits into from
May 14, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Apr 8, 2020

cherry-pick #16134 to release-4.0


What problem does this PR solve?

Issue Number: close #11518

Problem Summary: When GROUP BY is followed by a number in a select stmt and this number correspond to a window function in select fields, TiDB prints a different error message from MySQL.

What is changed and how it works?

What's Changed: When dealing with ast.PositionExpr in gbyResolver's Leave() method, we check if it's a ast.WindowFuncExpr. If so, ErrWrongGroupField will occur, which is expected.

Check List

Tests

  • Unit test

Release note

  • planner: fix different err msg from MySQL when group by window function

@sre-bot sre-bot requested a review from a team as a code owner April 8, 2020 04:42
@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 8, 2020

/run-all-tests

@breezewish
Copy link
Member

/run-integration-copr-test tikv=pr/7383

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 23, 2020
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/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 8, 2020
@sre-bot
Copy link
Contributor Author

sre-bot commented May 9, 2020

@zz-jason zz-jason added the status/can-merge Indicates a PR has been approved by a committer. label May 14, 2020
@sre-bot
Copy link
Contributor Author

sre-bot commented May 14, 2020

Your auto merge job has been accepted, waiting for:

  • 17118
  • 17107

@sre-bot
Copy link
Contributor Author

sre-bot commented May 14, 2020

@sre-bot
Copy link
Contributor Author

sre-bot commented May 14, 2020

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented May 14, 2020

@sre-bot merge failed.

@zz-jason
Copy link
Member

/merge

@sre-bot
Copy link
Contributor Author

sre-bot commented May 14, 2020

Your auto merge job has been accepted, waiting for:

  • 17126
  • 17164
  • 17167
  • 17155
  • 17114

@sre-bot
Copy link
Contributor Author

sre-bot commented May 14, 2020

/run-all-tests

@zz-jason zz-jason changed the title planner: fix different err msg from MySQL when group by window function (#16134) planner: fix different err msg from MySQL when gro ... (#16134) May 14, 2020
@zz-jason zz-jason merged commit 5e4caa7 into pingcap:release-4.0 May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor. 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/compatibility type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants