This commit is contained in:
Alexey Milovidov 2018-04-05 23:41:55 +03:00
parent 7d69a3363f
commit 32f6adc5ed
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
USE test;
DROP TABLE IF EXISTS test;
CREATE TABLE test
(
dt Date,
id Int32,
key String,
data Nullable(Int8)
) ENGINE = MergeTree(dt, (id, key, dt), 8192);
INSERT INTO test (dt,id, key,data) VALUES (now(), 100, 'key', 100500);
alter table test drop column data;
alter table test add column data Nullable(Float64);
INSERT INTO test (dt,id, key,data) VALUES (now(), 100, 'key', 100500);
OPTIMIZE TABLE test;
DROP TABLE test;