mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
better tests
This commit is contained in:
parent
e0803064e6
commit
d5a2f725c2
File diff suppressed because it is too large
Load Diff
@ -19,15 +19,19 @@ CREATE TABLE table_02184 (x UInt8) PRIMARY KEY x;
|
||||
SHOW CREATE TABLE table_02184;
|
||||
DROP TABLE table_02184;
|
||||
SET default_table_engine = 'Memory';
|
||||
CREATE TABLE numbers1 AS SELECT number FROM numbers(1000);
|
||||
CREATE TABLE numbers1 AS SELECT number FROM numbers(10);
|
||||
SHOW CREATE TABLE numbers1;
|
||||
SELECT * FROM numbers1;
|
||||
SELECT avg(number) FROM numbers1;
|
||||
DROP TABLE numbers1;
|
||||
SET default_table_engine = 'MergeTree';
|
||||
CREATE TABLE numbers2 ORDER BY intHash32(number) SAMPLE BY intHash32(number) AS SELECT number FROM numbers(10);
|
||||
SELECT * FROM numbers2;
|
||||
SELECT sum(number) FROM numbers2;
|
||||
SHOW CREATE TABLE numbers2;
|
||||
DROP TABLE numbers2;
|
||||
CREATE TABLE numbers3 ENGINE = Log AS SELECT number FROM numbers(10);
|
||||
SELECT sum(number) FROM numbers3;
|
||||
SHOW CREATE TABLE numbers3;
|
||||
DROP TABLE numbers3;
|
||||
CREATE TABLE test_table (EventDate Date, CounterID UInt32, UserID UInt64, EventTime DateTime('Europe/Moscow'), UTCEventTime DateTime('UTC')) PARTITION BY EventDate PRIMARY KEY CounterID;
|
||||
SET default_table_engine = 'Memory';
|
||||
CREATE MATERIALIZED VIEW test_view (Rows UInt64, MaxHitTime DateTime('Europe/Moscow')) AS SELECT count() AS Rows, max(UTCEventTime) AS MaxHitTime FROM test_table;
|
||||
|
Loading…
Reference in New Issue
Block a user