add test for crash described in #5859

This commit is contained in:
chertus 2019-08-06 14:15:48 +03:00
parent ecb25067a5
commit ffb053aa5f
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,5 @@
1 2019-01-01 a
1 2019-01-01 \N
1 2019-01-01 \N
2 2019-01-01 b
3 2019-01-01 c

View File

@ -0,0 +1,15 @@
drop table if exists test_join;
create table test_join (date Date, id Int32, name Nullable(String)) engine = MergeTree partition by date order by id;
insert into test_join values ('2019-01-01', 1, 'a');
insert into test_join values ('2019-01-01', 2, 'b');
insert into test_join values ('2019-01-01', 3, 'c');
insert into test_join values ('2019-01-01', 1, null);
SELECT id, date, name FROM (SELECT id, date, name FROM test_join GROUP BY id, name, date)
FULL OUTER JOIN (SELECT id, date, name FROM test_join GROUP BY id, name, date)
USING (id, name, date)
ORDER BY id, name;
drop table test_join;