More tests

(cherry picked from commit 235541a532)
This commit is contained in:
Alexey Milovidov 2020-11-23 12:10:38 +03:00 committed by Nikita Mikhailov
parent 7516f1460f
commit d58a8c98aa
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,5 @@
1 1
2020-01-01 10:00:00 2020-01-01 10:00:00
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'); INSERT INTO bar VALUES ('2020-01-01', 'test2'), ('2020-01-01', 'test3');
SET optimize_move_to_prewhere = 1; SET optimize_move_to_prewhere = 1;
SET any_join_distinct_right_table_keys = 0;
SELECT count() SELECT count()
FROM foo ANY INNER JOIN bar USING (dimension_1) 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 SELECT toDateTime(foo.server_time, 'UTC') FROM foo
SEMI JOIN bar USING (dimension_1) WHERE toDate(foo.server_time, 'UTC') <= toDate('2020-04-30'); 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 foo;
DROP TABLE bar; DROP TABLE bar;