From 8cdc7b42c8a532dc65ce312af18246a688382997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Thu, 30 Nov 2023 20:55:17 +0100 Subject: [PATCH] Add tests for 43202 --- .../0_stateless/02932_group_by_null_fuzzer.reference | 9 +++++++++ tests/queries/0_stateless/02932_group_by_null_fuzzer.sql | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 tests/queries/0_stateless/02932_group_by_null_fuzzer.reference create mode 100644 tests/queries/0_stateless/02932_group_by_null_fuzzer.sql diff --git a/tests/queries/0_stateless/02932_group_by_null_fuzzer.reference b/tests/queries/0_stateless/02932_group_by_null_fuzzer.reference new file mode 100644 index 00000000000..3d435bec003 --- /dev/null +++ b/tests/queries/0_stateless/02932_group_by_null_fuzzer.reference @@ -0,0 +1,9 @@ +\N + +\N +\N + +\N +1048575 \N \N + +1048575 \N \N diff --git a/tests/queries/0_stateless/02932_group_by_null_fuzzer.sql b/tests/queries/0_stateless/02932_group_by_null_fuzzer.sql new file mode 100644 index 00000000000..0c28c120d40 --- /dev/null +++ b/tests/queries/0_stateless/02932_group_by_null_fuzzer.sql @@ -0,0 +1,5 @@ +-- https://github.com/ClickHouse/ClickHouse/issues/43202 +-- Queries are generated by the fuzzer, so don't expect them to make sense +SELECT NULL, '' FROM (SELECT toNullable(''), NULL AS key GROUP BY GROUPING SETS ((NULL))) AS s1 ALL LEFT JOIN (SELECT '' AS key, NULL AS value GROUP BY GROUPING SETS (('')) WITH TOTALS UNION ALL SELECT NULL AS key, toNullable(NULL) AS value GROUP BY '', NULL, '' WITH TOTALS) AS s2 USING (key); +SELECT NULL GROUP BY NULL WITH TOTALS; +SELECT 1048575, NULL, b FROM (SELECT '25.5' AS a, NULL, NULL AS b GROUP BY GROUPING SETS ((0.0001)) WITH TOTALS) AS js1 ANY RIGHT JOIN (SELECT NULL AS a, NULL AS b WHERE NULL GROUP BY NULL, -9223372036854775807 WITH CUBE WITH TOTALS UNION ALL SELECT NULL AS a, NULL AS b GROUP BY 1, '21474836.46' WITH TOTALS) AS js2 USING (a, b) ORDER BY nan DESC NULLS LAST, '9223372036854775807' DESC NULLS LAST, a ASC NULLS LAST;