Add test case to 01049_join_low_card_crash

This commit is contained in:
vdimir 2021-06-15 11:59:02 +03:00
parent 05115dcd32
commit b6be838a75
No known key found for this signature in database
GPG Key ID: F57B3E10A21DBB31
2 changed files with 8 additions and 0 deletions

View File

@ -4,9 +4,13 @@ a 1 2
b 0 3 b 0 3
0 b 3 0 b 3
a 1 a 2 a 1 a 2
0
7
a 1 a 1
b \N b \N
a 1 2 a 1 2
b \N 3 b \N 3
a 1 a 2 a 1 a 2
\N \N b 3 \N \N b 3
7
\N

View File

@ -11,11 +11,15 @@ SELECT * FROM Alpha FULL JOIN (SELECT 'b' as foo) js2 USING (foo) ORDER BY foo;
SELECT * FROM Alpha FULL JOIN Beta USING (foo) ORDER BY foo; SELECT * FROM Alpha FULL JOIN Beta USING (foo) ORDER BY foo;
SELECT * FROM Alpha FULL JOIN Beta ON Alpha.foo = Beta.foo ORDER BY foo; SELECT * FROM Alpha FULL JOIN Beta ON Alpha.foo = Beta.foo ORDER BY foo;
-- https://github.com/ClickHouse/ClickHouse/issues/20315#issuecomment-789579457
SELECT materialize(js2.k) FROM (SELECT toLowCardinality(number) AS k FROM numbers(1)) AS js1 FULL OUTER JOIN (SELECT number + 7 AS k FROM numbers(1)) AS js2 USING (k) ORDER BY js2.k;
SET join_use_nulls = 1; SET join_use_nulls = 1;
SELECT * FROM Alpha FULL JOIN (SELECT 'b' as foo) js2 USING (foo) ORDER BY foo; SELECT * FROM Alpha FULL JOIN (SELECT 'b' as foo) js2 USING (foo) ORDER BY foo;
SELECT * FROM Alpha FULL JOIN Beta USING (foo) ORDER BY foo; SELECT * FROM Alpha FULL JOIN Beta USING (foo) ORDER BY foo;
SELECT * FROM Alpha FULL JOIN Beta ON Alpha.foo = Beta.foo ORDER BY foo; SELECT * FROM Alpha FULL JOIN Beta ON Alpha.foo = Beta.foo ORDER BY foo;
SELECT materialize(js2.k) FROM (SELECT toLowCardinality(number) AS k FROM numbers(1)) AS js1 FULL OUTER JOIN (SELECT number + 7 AS k FROM numbers(1)) AS js2 USING (k) ORDER BY js2.k;
DROP TABLE Alpha; DROP TABLE Alpha;
DROP TABLE Beta; DROP TABLE Beta;