Add test 02988_join_using_prewhere_pushdown

This commit is contained in:
vdimir 2024-02-12 14:03:45 +00:00
parent 727e0bbf6a
commit 2d7fdc896a
No known key found for this signature in database
GPG Key ID: 6EE4CE2BEDC51862
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;