Skip to content

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

@den-crane

Description

@den-crane
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

Metadata

Metadata

Assignees

Labels

bugConfirmed user-visible misbehaviour in official releasest-acceptedThe issue is in our backlog, ready to take

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions