More tests

This commit is contained in:
Alexey Milovidov 2020-11-23 12:10:38 +03:00
parent 92c5cfe243
commit 235541a532
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,5 @@
1
2020-01-01 10:00:00
2020-01-01 10:00:00
1
2020-01-01 10:00:00

View File

@ -8,6 +8,7 @@ INSERT INTO foo VALUES ('2020-01-01', '2020-01-01 12:00:00', 'test1'), ('2020-01
INSERT INTO bar VALUES ('2020-01-01', 'test2'), ('2020-01-01', 'test3');
SET optimize_move_to_prewhere = 1;
SET any_join_distinct_right_table_keys = 0;
SELECT count()
FROM foo ANY INNER JOIN bar USING (dimension_1)
@ -21,5 +22,16 @@ WHERE toDate(foo.server_time, 'UTC') <= toDate('2020-04-30');
SELECT toDateTime(foo.server_time, 'UTC') FROM foo
SEMI JOIN bar USING (dimension_1) WHERE toDate(foo.server_time, 'UTC') <= toDate('2020-04-30');
SET any_join_distinct_right_table_keys = 1;
SELECT count()
FROM foo ANY INNER JOIN bar USING (dimension_1)
WHERE (foo.server_date <= '2020-11-07') AND (toDate(foo.server_time, 'Asia/Yekaterinburg') <= '2020-11-07');
SELECT toDateTime(foo.server_time, 'UTC')
FROM foo
ANY INNER JOIN bar USING (dimension_1)
WHERE toDate(foo.server_time, 'UTC') <= toDate('2020-04-30');
DROP TABLE foo;
DROP TABLE bar;