Added tests.

This commit is contained in:
Nikolai Kochetov 2018-10-04 21:18:04 +03:00
parent b1fa3fab9d
commit 2f2c939446
4 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,13 @@
drop table if exists test.trepl;
create table test.trepl
(
d Date,
a Int32,
b Int32
) engine = ReplacingMergeTree(d, (a,b), 8192);
insert into test.trepl values ('2018-09-19', 1, 1);
select b from test.trepl FINAL prewhere a < 1000;
drop table test.trepl;

View File

@ -0,0 +1,13 @@
create database if not exists test;
drop table if exists test.t;
create table test.t (a Int32, b Int32) engine = MergeTree partition by (a,b) order by (a);
insert into test.t values (1, 1);
alter table test.t add column c Int32;
select b from test.t prewhere a < 1000;
select c from test.t where a < 1000;
select c from test.t prewhere a < 1000;
drop table test.t;