mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
parent
7516f1460f
commit
d58a8c98aa
@ -1,3 +1,5 @@
|
||||
1
|
||||
2020-01-01 10:00:00
|
||||
2020-01-01 10:00:00
|
||||
1
|
||||
2020-01-01 10:00:00
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user