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 error caused by different length between inner and outer OrderByItems #8273

Merged
merged 6 commits into from
Nov 13, 2018

Conversation

mtunique
Copy link
Contributor

@mtunique mtunique commented Nov 12, 2018

What problem does this PR solve?

Fix #8198 nest different size order by.

What is changed and how it works?

matchItems function cannot cover the case that the length of columns is greater than items.
Check the length before iterating the columns.

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

@zz-jason zz-jason added contribution This PR is from a community contributor. type/bugfix This PR fixes a bug. sig/planner SIG: Planner labels Nov 12, 2018
planner/core/physical_plan_test.go Show resolved Hide resolved
planner/core/physical_plan_test.go Outdated Show resolved Hide resolved
@sre-bot
Copy link
Contributor

sre-bot commented Nov 12, 2018

Hi contributor, thanks for your PR.

This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically.

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 Nov 12, 2018
@zz-jason
Copy link
Member

/run-all-tests

@XuHuaiyu
Copy link
Contributor

It will be nice if you can add the case mentioned in the issue as an integration test.

@mtunique
Copy link
Contributor Author

It will be nice if you can add the case mentioned in the issue as an integration test.

Ok I will add it.

@mtunique
Copy link
Contributor Author

/run-all-tests

@zz-jason
Copy link
Member

@mtunique Could you please cherry-pick this PR to the release-2.1 and release-2.0 branch after it merged?

@mtunique
Copy link
Contributor Author

@mtunique Could you please cherry-pick this PR to the release-2.1 and release-2.0 branch after it merged?

OK

@XuHuaiyu XuHuaiyu changed the title planner: Fix nest different size order by planner: fix error caused by different length between inner and outer OrderByItems Nov 12, 2018
@mtunique
Copy link
Contributor Author

/run-all-tests

@mtunique
Copy link
Contributor Author

It will be nice if you can add the case mentioned in the issue as an integration test.

Done. Add two explain cases.

@lzmhhh123
Copy link
Contributor

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 Nov 13, 2018
@zz-jason zz-jason merged commit 19c01f4 into pingcap:master Nov 13, 2018
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/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.

6 participants