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 wrong column calculation in ColumnPruning for LogicalUnionAll #10384

Merged
merged 9 commits into from May 8, 2019

Conversation

erjiaqing
Copy link
Contributor

What problem does this PR solve?

Fix #10341

What is changed and how it works?

Wrongly used Children()[0].Schema().Columns in ColumnPruning for LogicalUnionAll.

ColumnPruning for LogicalUnionAll calculate its own Columns instead of use Childres's, which will lead to wrong column names.

For column name in LogicalUnionAll contains table name (AsName in ast), but logicalProjection does not and should not contain table name.

Check List

Tests

  • Unit test

@erjiaqing erjiaqing requested review from winoros and zz-jason May 8, 2019 03:07
@codecov
Copy link

codecov bot commented May 8, 2019

Codecov Report

Merging #10384 into master will decrease coverage by 0.0005%.
The diff coverage is 100%.

@@               Coverage Diff               @@
##            master     #10384        +/-   ##
===============================================
- Coverage   77.353%   77.3525%   -0.0006%     
===============================================
  Files          412        412                
  Lines        85729      85705        -24     
===============================================
- Hits         66314      66295        -19     
+ Misses       14386      14381         -5     
  Partials      5029       5029

@winoros winoros added sig/planner SIG: Planner type/bug-fix This PR fixes a bug. labels May 8, 2019
Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

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

lgtm

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/LGT2 Indicates that a PR has LGTM 2. label May 8, 2019
@erjiaqing
Copy link
Contributor Author

/run-all-tests

@ngaut ngaut merged commit 78ecec4 into pingcap:master May 8, 2019
@erjiaqing erjiaqing deleted the issue_10341 branch May 9, 2019 10:54
erjiaqing added a commit to erjiaqing/tidb that referenced this pull request May 10, 2019
@sre-bot sre-bot added the contribution This PR is from a community contributor. label Dec 18, 2019
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/bug-fix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected ambiguous error
6 participants