add test with 'ALTER MODIFY' and compact parts

This commit is contained in:
Anton Popov 2020-04-08 19:33:57 +03:00
parent c8c4dc8104
commit ae2a05d414
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1 @@
999000

View File

@ -0,0 +1,12 @@
DROP TABLE IF EXISTS mt_compact;
CREATE TABLE mt_compact (d Date, id UInt32, s String)
ENGINE = MergeTree ORDER BY id PARTITION BY d
SETTINGS min_bytes_for_wide_part = 10000000, index_granularity = 128;
INSERT INTO mt_compact SELECT toDate('2020-01-05'), number, toString(number) FROM numbers(1000);
INSERT INTO mt_compact SELECT toDate('2020-01-06'), number, toString(number) FROM numbers(1000);
ALTER TABLE mt_compact MODIFY COLUMN s UInt64;
SELECT sum(s) from mt_compact;
DROP TABLE IF EXISTS mt_compact;