mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 02:21:59 +00:00
Added tests.
This commit is contained in:
parent
b1fa3fab9d
commit
2f2c939446
@ -0,0 +1 @@
|
|||||||
|
1
|
13
dbms/tests/queries/0_stateless/00712_prewhere_with_final.sql
Normal file
13
dbms/tests/queries/0_stateless/00712_prewhere_with_final.sql
Normal 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;
|
||||||
|
|
@ -0,0 +1,3 @@
|
|||||||
|
1
|
||||||
|
0
|
||||||
|
0
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user