mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
JOIN filter push down filled join fix
This commit is contained in:
parent
49c91e3544
commit
97a411365d
@ -253,7 +253,7 @@ static size_t tryPushDownOverJoinStep(QueryPlan::Node * parent_node, QueryPlan::
|
||||
|
||||
bool has_single_clause = table_join.getClauses().size() == 1;
|
||||
|
||||
if (has_single_clause)
|
||||
if (has_single_clause && !filled_join)
|
||||
{
|
||||
const auto & join_clause = table_join.getClauses()[0];
|
||||
size_t key_names_size = join_clause.key_names_left.size();
|
||||
|
@ -0,0 +1 @@
|
||||
1 1 1 test
|
@ -0,0 +1,45 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1
|
||||
(
|
||||
id UInt64,
|
||||
external_id UInt64
|
||||
)
|
||||
ENGINE = MergeTree
|
||||
ORDER BY id;
|
||||
|
||||
DROP TABLE IF EXISTS t2;
|
||||
CREATE TABLE t2
|
||||
(
|
||||
id UInt64,
|
||||
name String
|
||||
)
|
||||
ENGINE = MergeTree
|
||||
ORDER BY id;
|
||||
|
||||
INSERT INTO t1 VALUES (1, 1);
|
||||
|
||||
INSERT INTO t2 VALUES (1, 'test');
|
||||
|
||||
DROP DICTIONARY IF EXISTS d2;
|
||||
CREATE DICTIONARY d2
|
||||
(
|
||||
id UInt64,
|
||||
name String,
|
||||
)
|
||||
PRIMARY KEY id
|
||||
SOURCE(CLICKHOUSE(
|
||||
table t2))
|
||||
LIFETIME(MIN 600 MAX 900)
|
||||
LAYOUT(HASHED());
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
t1
|
||||
LEFT JOIN d2 ON d2.id = t1.external_id
|
||||
WHERE t1.id = 1
|
||||
LIMIT 1;
|
||||
|
||||
DROP DICTIONARY d2;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
Loading…
Reference in New Issue
Block a user