Merge pull request #6362 from 4ertus2/bugs

Test for crash from #5859
This commit is contained in:
Artem Zuikov 2019-08-06 19:50:12 +03:00 committed by GitHub
commit 048fe08bde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;