ClickHouse/tests/queries/0_stateless/01197_summing_enum.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
441 B
MySQL
Raw Normal View History

2020-04-15 04:20:22 +00:00
DROP TABLE IF EXISTS summing;
CREATE TABLE summing (k String, x UInt64, e Enum('hello' = 1, 'world' = 2)) ENGINE = SummingMergeTree ORDER BY k;
INSERT INTO summing SELECT '', 1, e FROM generateRandom('e Enum(\'hello\' = 1, \'world\' = 2)', 1) LIMIT 1000;
INSERT INTO summing SELECT '', 1, e FROM generateRandom('e Enum(\'hello\' = 1, \'world\' = 2)', 1) LIMIT 1000;
OPTIMIZE TABLE summing;
SELECT k, x, e FROM summing;
DROP TABLE summing;