The issue
We had a table with an Enum column in primary key:
CREATE TABLE x (
EventDate Date,
a Enum8('foo'=1)
) Engine = MergeTree(EventDate, (EventDate, a), 8192);
Then we tried adding new Enum value to column a:
ALTER TABLE x MODIFY COLUMN a Enum8('foo'=1, 'bar'=2);
Unfortunately, clickhouse returned the error instead of altering the table:
DB::Exception: trying to ALTER key column a
Expected behavior
clickhouse must note that the new Enum for column a contains all the old values plus new one, so it must instantly add new value to a Enum without column scanning/rebuilding.