From ffb053aa5f16022acb327695634c3dfeaa7ca144 Mon Sep 17 00:00:00 2001 From: chertus Date: Tue, 6 Aug 2019 14:15:48 +0300 Subject: [PATCH] add test for crash described in #5859 --- .../00980_full_join_crash_fancyqlx.reference | 5 +++++ .../00980_full_join_crash_fancyqlx.sql | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00980_full_join_crash_fancyqlx.reference create mode 100644 dbms/tests/queries/0_stateless/00980_full_join_crash_fancyqlx.sql diff --git a/dbms/tests/queries/0_stateless/00980_full_join_crash_fancyqlx.reference b/dbms/tests/queries/0_stateless/00980_full_join_crash_fancyqlx.reference new file mode 100644 index 00000000000..5399cf08165 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00980_full_join_crash_fancyqlx.reference @@ -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 diff --git a/dbms/tests/queries/0_stateless/00980_full_join_crash_fancyqlx.sql b/dbms/tests/queries/0_stateless/00980_full_join_crash_fancyqlx.sql new file mode 100644 index 00000000000..2514b6ded1b --- /dev/null +++ b/dbms/tests/queries/0_stateless/00980_full_join_crash_fancyqlx.sql @@ -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;