Merge pull request #59892 from ClickHouse/vdimir/02988_join_using_prewhere_pushdown

Add test 02988_join_using_prewhere_pushdown
This commit is contained in:
vdimir 2024-02-13 09:59:15 +01:00 committed by GitHub
commit f438d35dad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,2 @@
1 a
2 b Int64

View File

@ -0,0 +1,24 @@
DROP TABLE IF EXISTS t;
SET allow_suspicious_low_cardinality_types = 1;
CREATE TABLE t (`id` UInt16, `u` LowCardinality(Int32), `s` LowCardinality(String))
ENGINE = MergeTree ORDER BY id;
INSERT INTO t VALUES (1,1,'a'),(2,2,'b');
SELECT u, s FROM t
INNER JOIN ( SELECT number :: Int32 AS u FROM numbers(10) ) AS t1
USING (u)
WHERE u != 2
;
SELECT u, s, toTypeName(u) FROM t
FULL JOIN ( SELECT number :: UInt32 AS u FROM numbers(10) ) AS t1
USING (u)
WHERE u == 2
ORDER BY 1
;
DROP TABLE IF EXISTS t;