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

Changes of Enum in partition key is not FULLY applied until reattach #13675

Closed
den-crane opened this issue Aug 13, 2020 · 2 comments · Fixed by #21334
Closed

Changes of Enum in partition key is not FULLY applied until reattach #13675

den-crane opened this issue Aug 13, 2020 · 2 comments · Fixed by #21334
Assignees
Labels
bug Confirmed user-visible misbehaviour in official release st-accepted The issue is in our backlog, ready to take

Comments

@den-crane
Copy link
Contributor

CREATE TABLE report
(
    `product` Enum8('IU' = 1, 'WS' = 2),
    `machine` String,
    `branch` String,
    `build_c1` String,
    `build_c2` String,
    `build_c3` String,
    `build_time` DateTime,
    `generated_time` DateTime
)
ENGINE = MergeTree
PARTITION BY (product, toYYYYMM(generated_time))
ORDER BY (product, machine, branch, build_c1, build_c2, build_c3, build_time, generated_time)

select *  from report  where product = 'IU'
Ok.

alter table report modify column product Enum8('IU' = 1, 'WS' = 2, 'PS' = 3);

select * from report where product = 'PS'

DB::Exception: Key expression contains comparison between inconvertible types: 
Enum8('IU' = 1, 'WS' = 2) and String inside product = 'PS'


detach table report;
attach table report;
select * from report where product = 'PS'
Ok.


related: #7513 #11973

@den-crane den-crane added the bug Confirmed user-visible misbehaviour in official release label Aug 13, 2020
@alexey-milovidov alexey-milovidov added the st-accepted The issue is in our backlog, ready to take label Aug 14, 2020
@den-crane
Copy link
Contributor Author

20.11.1.4897 relevant

@alexey-milovidov
Copy link
Member

Still relevant in 21.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release st-accepted The issue is in our backlog, ready to take
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants