2019-04-16 14:13:13 +00:00
|
|
|
drop table if exists trepl;
|
2022-06-23 08:37:52 +00:00
|
|
|
set allow_deprecated_syntax_for_merge_tree=1;
|
2019-04-16 14:13:13 +00:00
|
|
|
create table trepl(d Date,a Int32, b Int32) engine = ReplacingMergeTree(d, (a,b), 8192);
|
|
|
|
insert into trepl values ('2018-09-19', 1, 1);
|
|
|
|
select b from trepl FINAL prewhere a < 1000;
|
|
|
|
drop table trepl;
|
2018-10-04 18:18:04 +00:00
|
|
|
|
2018-11-08 16:39:43 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
drop table if exists versioned_collapsing;
|
|
|
|
create table versioned_collapsing(d Date, x UInt32, sign Int8, version UInt32) engine = VersionedCollapsingMergeTree(d, x, 8192, sign, version);
|
|
|
|
insert into versioned_collapsing values ('2018-09-19', 123, 1, 0);
|
|
|
|
select x from versioned_collapsing FINAL prewhere version < 1000;
|
|
|
|
drop table versioned_collapsing;
|