mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
adjust more tests for parallel_join
This commit is contained in:
parent
578494660c
commit
2e38bb5f23
@ -172,7 +172,7 @@ $CLICKHOUSE_CLIENT -q "
|
||||
$CLICKHOUSE_CLIENT -q "
|
||||
select number as a, r.b from numbers(4) as l any left join (
|
||||
select number + 2 as b from numbers(3)
|
||||
) as r on a = r.b where a != 1 and b != 2 settings enable_optimize_predicate_expression = 0"
|
||||
) as r on a = r.b where a != 1 and b != 2 settings enable_optimize_predicate_expression = 0" | sort
|
||||
|
||||
echo "> one condition of filter is pushed down before INNER JOIN"
|
||||
$CLICKHOUSE_CLIENT -q "
|
||||
|
@ -21,9 +21,11 @@ CREATE TABLE dictionary_source_ru
|
||||
|
||||
INSERT INTO dictionary_source_ru VALUES (1, 'Один'), (2,'Два'), (3, 'Три');
|
||||
|
||||
CREATE VIEW dictionary_source_view AS SELECT id, dictionary_source_en.value as value_en, dictionary_source_ru.value as value_ru FROM dictionary_source_en LEFT JOIN dictionary_source_ru USING (id);
|
||||
CREATE VIEW dictionary_source_view AS
|
||||
SELECT id, dictionary_source_en.value as value_en, dictionary_source_ru.value as value_ru
|
||||
FROM dictionary_source_en LEFT JOIN dictionary_source_ru USING (id);
|
||||
|
||||
select * from dictionary_source_view;
|
||||
select * from dictionary_source_view ORDER BY id;
|
||||
|
||||
CREATE DICTIONARY flat_dictionary
|
||||
(
|
||||
|
@ -8,11 +8,12 @@ SELECT a
|
||||
FROM t1_all AS t1
|
||||
ALL INNER JOIN test_02115.t2_local AS t2 ON a = t2.a
|
||||
1
|
||||
2
|
||||
3
|
||||
1
|
||||
2
|
||||
2
|
||||
3
|
||||
3
|
||||
-
|
||||
1
|
||||
2
|
||||
3
|
||||
@ -24,13 +25,13 @@ FROM t1_all AS t1
|
||||
GLOBAL ALL INNER JOIN t2_all AS t2 ON a = t2.a
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
3
|
||||
3
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
|
@ -13,18 +13,20 @@ create table t2_local as t1_local;
|
||||
create table t1_all as t1_local engine Distributed(test_cluster_two_shards_localhost, test_02115, t1_local, rand());
|
||||
create table t2_all as t2_local engine Distributed(test_cluster_two_shards_localhost, test_02115, t2_local, rand());
|
||||
|
||||
insert into t1_local values(1), (2), (3);
|
||||
insert into t2_local values(1), (2), (3);
|
||||
insert into t1_local values (1), (2), (3);
|
||||
insert into t2_local values (1), (2), (3);
|
||||
|
||||
set distributed_product_mode = 'local';
|
||||
select * from t1_all t1 where t1.a in (select t2.a from t2_all t2);
|
||||
explain syntax select t1.* from t1_all t1 join t2_all t2 on t1.a = t2.a;
|
||||
select t1.* from t1_all t1 join t2_all t2 on t1.a = t2.a;
|
||||
select t1.* from t1_all t1 join t2_all t2 on t1.a = t2.a ORDER BY t1.a;
|
||||
|
||||
SELECT '-';
|
||||
|
||||
set distributed_product_mode = 'global';
|
||||
select * from t1_all t1 where t1.a in (select t2.a from t2_all t2);
|
||||
explain syntax select t1.* from t1_all t1 join t2_all t2 on t1.a = t2.a;
|
||||
select t1.* from t1_all t1 join t2_all t2 on t1.a = t2.a;
|
||||
select t1.* from t1_all t1 join t2_all t2 on t1.a = t2.a ORDER BY t1.a;
|
||||
|
||||
DROP TABLE t1_local;
|
||||
DROP TABLE t2_local;
|
||||
|
@ -1,17 +1,20 @@
|
||||
(Expression)
|
||||
ExpressionTransform
|
||||
ExpressionTransform × 16
|
||||
(Join)
|
||||
JoiningTransform 2 → 1
|
||||
(Expression)
|
||||
ExpressionTransform
|
||||
(Limit)
|
||||
Limit
|
||||
(ReadFromStorage)
|
||||
Numbers 0 → 1
|
||||
(Expression)
|
||||
FillingRightJoinSide
|
||||
JoiningTransform × 16 2 → 1
|
||||
Resize 1 → 16
|
||||
(Expression)
|
||||
ExpressionTransform
|
||||
(Limit)
|
||||
Limit
|
||||
(ReadFromStorage)
|
||||
Numbers 0 → 1
|
||||
(Expression)
|
||||
Resize × 2 16 → 1
|
||||
FillingRightJoinSide × 16
|
||||
Resize 1 → 16
|
||||
ExpressionTransform
|
||||
(Limit)
|
||||
Limit
|
||||
(ReadFromStorage)
|
||||
Numbers 0 → 1
|
||||
|
@ -1,5 +1,3 @@
|
||||
-- Tags: ignore-order
|
||||
|
||||
EXPLAIN PIPELINE
|
||||
SELECT * FROM
|
||||
(
|
||||
|
Loading…
Reference in New Issue
Block a user