Fixed test (it was dependent on time zone) [#CLICKHOUSE-2].

This commit is contained in:
Alexey Milovidov 2017-08-14 03:02:12 +03:00
parent 0ef64e5dfe
commit 6ec873c75e
2 changed files with 25 additions and 25 deletions

View File

@ -1,20 +1,20 @@
2000-01-01 1970-01-01 00:00:01 11 1235
2000-01-01 1970-01-01 00:00:02 11 4395
2000-01-01 1970-01-01 00:00:03 22 3545
2000-01-01 1970-01-01 00:00:04 22 6984
2000-01-01 1970-01-01 00:00:05 33 4596
2000-01-01 1970-01-01 00:02:03 33 1235
2000-01-01 1970-01-01 00:02:01 33 2791
2000-01-01 1970-01-01 00:02:02 33 2791
2000-01-01 1970-01-01 00:02:05 44 4578
2000-01-01 1970-01-01 00:02:04 44 4935
2000-01-01 1970-01-01 00:02:08 55 1235
2000-01-01 1970-01-01 00:02:07 55 2791
2000-01-01 1970-01-01 00:02:06 55 5786
2000-01-01 1970-01-01 00:00:01 11 1235
2000-01-01 1970-01-01 00:01:03 11 3572
2000-01-01 1970-01-01 00:01:01 11 4563
2000-01-01 1970-01-01 00:01:02 11 4578
2000-01-01 1970-01-01 00:01:03 11 3572
2000-01-01 1970-01-01 00:01:01 11 4563
2000-01-01 1970-01-01 00:01:02 11 4578
1 11 1235
2 11 4395
3 22 3545
4 22 6984
5 33 4596
123 33 1235
121 33 2791
122 33 2791
125 44 4578
124 44 4935
128 55 1235
127 55 2791
126 55 5786
1 11 1235
63 11 3572
61 11 4563
62 11 4578
63 11 3572
61 11 4563
62 11 4578

View File

@ -9,21 +9,21 @@ SET max_block_size = 1;
-- Test inferred limit
SET max_rows_to_read = 5;
SELECT * FROM test.pk WHERE x BETWEEN toDateTime(0) AND toDateTime(59);
SELECT toUInt32(x), y, z FROM test.pk WHERE x BETWEEN toDateTime(0) AND toDateTime(59);
SET max_rows_to_read = 9;
SELECT * FROM test.pk WHERE x BETWEEN toDateTime(120) AND toDateTime(240);
SELECT toUInt32(x), y, z FROM test.pk WHERE x BETWEEN toDateTime(120) AND toDateTime(240);
-- Index is coarse, cannot read single row
SET max_rows_to_read = 5;
SELECT * FROM test.pk WHERE x = toDateTime(1);
SELECT toUInt32(x), y, z FROM test.pk WHERE x = toDateTime(1);
-- Index works on interval 00:01:00 - 00:01:59
SET max_rows_to_read = 4;
SELECT * FROM test.pk WHERE x BETWEEN toDateTime(60) AND toDateTime(119) AND y = 11;
SELECT toUInt32(x), y, z FROM test.pk WHERE x BETWEEN toDateTime(60) AND toDateTime(119) AND y = 11;
-- Cannot read less rows as PK is coarser on interval 00:01:00 - 00:02:00
SET max_rows_to_read = 5;
SELECT * FROM test.pk WHERE x BETWEEN toDateTime(60) AND toDateTime(120) AND y = 11;
SELECT toUInt32(x), y, z FROM test.pk WHERE x BETWEEN toDateTime(60) AND toDateTime(120) AND y = 11;
DROP TABLE test.pk;