test for alter with ttl

This commit is contained in:
CurtizJ 2020-01-23 16:11:06 +03:00
parent b5d8baee71
commit 1764ba5219
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1,2 @@
CREATE TABLE default.alter_ttl (`i` Int, `s` String TTL toDate(\'2020-01-01\')) ENGINE = MergeTree ORDER BY i TTL toDate(\'2020-05-05\') SETTINGS index_granularity = 8192
CREATE TABLE default.alter_ttl (`d` Date, `s` String TTL d + toIntervalDay(1)) ENGINE = MergeTree ORDER BY d TTL d + toIntervalMonth(1) SETTINGS index_granularity = 8192

View File

@ -6,7 +6,7 @@ alter table alter_ttl modify column s String ttl toDate('2020-01-01');
show create table alter_ttl;
drop table alter_ttl;
create table alter_ttl(d Date, s String) engine = MergeTree order by i ttl d + interval 1 month;
create table alter_ttl(d Date, s String) engine = MergeTree order by d ttl d + interval 1 month;
alter table alter_ttl modify column s String ttl d + interval 1 day;
show create table alter_ttl;
drop table alter_ttl;