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