mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
add more tests
This commit is contained in:
parent
8eebcad52d
commit
37b8497747
@ -1,10 +1,5 @@
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
ClickHouse client version 19.17.1.1.
|
||||
Connecting to localhost:9000 as user default.
|
||||
Connected to ClickHouse server version 19.17.1 revision 54428.
|
||||
|
||||
jakalletti :)
|
@ -1,25 +1,16 @@
|
||||
drop table if exists tst;
|
||||
|
||||
create table tst (timestamp DateTime, val Nullable(Int8)) engine SummingMergeTree partition by toYYYYMM(timestamp) ORDER by (timestamp);
|
||||
|
||||
insert into tst values ('2018-02-01 00:00:00', 1), ('2018-02-02 00:00:00', 2);
|
||||
|
||||
select count() from tst;
|
||||
select count() from tst final;
|
||||
|
||||
select count() from tst where timestamp is not null;
|
||||
select count() from tst final where timestamp is not null;
|
||||
|
||||
select count() from tst where val is not null;
|
||||
select count() from tst final where val is not null;
|
||||
|
||||
select count() from tst final where timestamp>0;
|
||||
select count() from tst final prewhere timestamp > 0;
|
||||
|
||||
select count() from tst final where val>0;
|
||||
select count() from tst final prewhere val>0;
|
||||
|
||||
drop table tst;
|
||||
drop table if exists tst2;
|
||||
create table tst2
|
||||
(
|
||||
timestamp DateTime,
|
||||
val Nullable(Int8)
|
||||
) engine MergeTree partition by toYYYYMM(timestamp) ORDER by (timestamp);
|
||||
|
||||
insert into tst2 values ('2018-02-01 00:00:00', 1), ('2018-02-02 00:00:00', 2);
|
||||
|
||||
select * from tst2;
|
||||
select count() from tst2 where val is not null;
|
||||
select count() from tst2 where timestamp is not null;
|
||||
select count(*) from tst2 where timestamp > '2017-01-01 00:00:00'
|
||||
|
||||
drop table tst2;
|
||||
|
Loading…
Reference in New Issue
Block a user