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

executor: fix wrong behavior when ENUM column meet Aggregation (#14035) #14364

Merged
merged 3 commits into from
Jan 7, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Jan 7, 2020

cherry-pick #14035 to release-3.0


What problem does this PR solve?

Fix wrong behavior when ENUM column meet Aggregation as #13027

What is changed and how it works?

Add firstRow4Enum, the first_row executor for ENUM

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)
mysql> create table t(a enum('a', 'b'));
Query OK, 0 rows affected (0.01 sec)

mysql> insert into t values('a'), ('b');
Query OK, 2 rows affected (0.00 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> select cast(a as signed) from (select a from t group by a) t;
+-------------------+
| cast(a as signed) |
+-------------------+
|                 1 |
|                 2 |
+-------------------+
2 rows in set (0.00 sec)

mysql> 

@sre-bot
Copy link
Contributor Author

sre-bot commented Jan 7, 2020

/run-all-tests

Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

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

LGTM

@SunRunAway SunRunAway added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 7, 2020
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 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 Jan 7, 2020
@sre-bot
Copy link
Contributor Author

sre-bot commented Jan 7, 2020

/run-all-tests

@zz-jason zz-jason merged commit b89108b into pingcap:release-3.0 Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression contribution This PR is from a community contributor. sig/execution SIG execution 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.

4 participants