Merge pull request #35638 from den-crane/test/crash_35551

test for crash _join_with_nullable_lowcardinality #35551
This commit is contained in:
Alexey Milovidov 2022-04-06 03:28:18 +03:00 committed by GitHub
commit eb1953f91e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,20 @@
drop table if exists with_nullable;
drop table if exists without_nullable;
CREATE TABLE with_nullable
( timestamp UInt32,
country LowCardinality(Nullable(String)) ) ENGINE = Memory;
CREATE TABLE without_nullable
( timestamp UInt32,
country LowCardinality(String)) ENGINE = Memory;
insert into with_nullable values(0,'f'),(0,'usa');
insert into without_nullable values(0,'usa'),(0,'us2a');
select if(t0.country is null ,t2.country,t0.country) "country"
from without_nullable t0 right outer join with_nullable t2 on t0.country=t2.country;
drop table with_nullable;
drop table without_nullable;