-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Changes of Enum in partition key is not FULLY applied until reattach #13675
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasest-acceptedThe issue is in our backlog, ready to takeThe issue is in our backlog, ready to take
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasest-acceptedThe issue is in our backlog, ready to takeThe issue is in our backlog, ready to take