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

Fix enum conversion in native format for backward compatibility. #7908

Merged
merged 2 commits into from
Nov 26, 2019

Conversation

CurtizJ
Copy link
Member

@CurtizJ CurtizJ commented Nov 25, 2019

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Bug Fix

Changelog entry (up to few sentences, required except for Non-significant/Documentation categories):

Fix enum conversion in native format for backward compatibility.

Detailed description (optional):

Fixes #7836. We can allow insert enum column if it's numeric type is the same as the column's type in table. More details in related issue.

@CurtizJ CurtizJ changed the title fix enum conversion in native format for backward compatibility. Fix enum conversion in native format for backward compatibility. Nov 25, 2019
@@ -92,6 +92,9 @@ ColumnPtr recursiveLowCardinalityConversion(const ColumnPtr & column, const Data
if (from_type->equals(*to_type))
return column;

if (WhichDataType(to_type).isEnum() && from_type->getTypeId() == to_type->getTypeId())
Copy link
Member

Choose a reason for hiding this comment

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

Need comment here.

Copy link
Member

Choose a reason for hiding this comment

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

Also it's not correspond to function name now. Is is used only once. Maybe rename it?

@stavrolia stavrolia added the pr-bugfix Pull request with bugfix, not backported by default label Nov 26, 2019
@stavrolia stavrolia merged commit 4d6214d into ClickHouse:master Nov 26, 2019
abyss7 pushed a commit that referenced this pull request Nov 29, 2019
Fix enum conversion in native format for backward compatibility.

(cherry picked from commit 4d6214d)
@abyss7 abyss7 added the v19.16 label Dec 2, 2019
nikitamikhaylov pushed a commit that referenced this pull request Dec 2, 2019
Fix enum conversion in native format for backward compatibility.

(cherry picked from commit 4d6214d)
vitlibar pushed a commit that referenced this pull request Dec 27, 2019
Fix enum conversion in native format for backward compatibility.

(cherry picked from commit 4d6214d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix Pull request with bugfix, not backported by default
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot convert Enum while insert in native format after ALTER.
6 participants