-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JOIN filter push down filled join fix
- Loading branch information
1 parent
49c91e3
commit 97a4113
Showing
3 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
tests/queries/0_stateless/03143_join_filter_push_down_filled_join_fix.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 1 1 test |
45 changes: 45 additions & 0 deletions
45
tests/queries/0_stateless/03143_join_filter_push_down_filled_join_fix.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |