mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
More test
This commit is contained in:
parent
be38b0fe75
commit
760b455ea3
@ -1,3 +1,4 @@
|
||||
0
|
||||
1970-01-01 2106-02-07 1970-04-11 1970-01-01 2106-02-07
|
||||
1970-01-01 03:00:00 2106-02-07 09:28:15 1970-01-01 03:16:40
|
||||
2000-01-01 13:12:12
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS tdm;
|
||||
DROP TABLE IF EXISTS tdm2;
|
||||
CREATE TABLE tdm (x DateTime) ENGINE = MergeTree ORDER BY x SETTINGS write_final_mark = 0;
|
||||
INSERT INTO tdm VALUES (now());
|
||||
SELECT count(x) FROM tdm WHERE toDate(x) < today() SETTINGS max_rows_to_read = 1;
|
||||
@ -6,4 +7,10 @@ SELECT count(x) FROM tdm WHERE toDate(x) < today() SETTINGS max_rows_to_read = 1
|
||||
SELECT toDate(-1), toDate(10000000000000), toDate(100), toDate(65536), toDate(65535);
|
||||
SELECT toDateTime(-1), toDateTime(10000000000000), toDateTime(1000);
|
||||
|
||||
CREATE TABLE tdm2 (timestamp UInt32) ENGINE = MergeTree ORDER BY timestamp SETTINGS index_granularity = 1;
|
||||
INSERT INTO tdm2 VALUES (toUnixTimestamp('2000-01-01 13:12:12')), (toUnixTimestamp('2000-01-01 14:12:12')), (toUnixTimestamp('2000-01-01 15:12:12'));
|
||||
SET max_rows_to_read = 1;
|
||||
SELECT toDateTime(timestamp) FROM tdm2 WHERE toHour(toDateTime(timestamp)) = 13;
|
||||
|
||||
DROP TABLE tdm;
|
||||
DROP TABLE tdm2;
|
||||
|
Loading…
Reference in New Issue
Block a user