ClickHouse/tests/queries/0_stateless/01344_alter_enum_partition_key.sql

13 lines
376 B
MySQL
Raw Normal View History

2020-06-25 21:06:49 +00:00
DROP TABLE IF EXISTS test;
CREATE TABLE test (x Enum('hello' = 1, 'world' = 2), y String) ENGINE = MergeTree PARTITION BY x ORDER BY y;
INSERT INTO test VALUES ('hello', 'test');
SELECT * FROM test;
ALTER TABLE test MODIFY COLUMN x Enum('hello' = 1, 'world' = 2, 'goodbye' = 3);
INSERT INTO test VALUES ('goodbye', 'test');
SELECT * FROM test ORDER BY x;
DROP TABLE test;