From a93e29ef4a20e3d81bd390822e1b22cead88dfbe Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Wed, 3 Mar 2021 02:00:19 +0300 Subject: [PATCH] Add a test for #14740 --- .../01747_transform_empty_arrays.reference | 1 + .../01747_transform_empty_arrays.sql | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/queries/0_stateless/01747_transform_empty_arrays.reference create mode 100644 tests/queries/0_stateless/01747_transform_empty_arrays.sql diff --git a/tests/queries/0_stateless/01747_transform_empty_arrays.reference b/tests/queries/0_stateless/01747_transform_empty_arrays.reference new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/tests/queries/0_stateless/01747_transform_empty_arrays.reference @@ -0,0 +1 @@ +1 diff --git a/tests/queries/0_stateless/01747_transform_empty_arrays.sql b/tests/queries/0_stateless/01747_transform_empty_arrays.sql new file mode 100644 index 00000000000..cc9a00a4555 --- /dev/null +++ b/tests/queries/0_stateless/01747_transform_empty_arrays.sql @@ -0,0 +1,27 @@ +SELECT * +FROM +( + WITH + + ( + SELECT groupArray(a) + FROM + ( + SELECT 1 AS a + ) + ) AS keys, + + ( + SELECT groupArray(a) + FROM + ( + SELECT 2 AS a + ) + ) AS values + SELECT * + FROM + ( + SELECT 1 AS a + ) + WHERE transform(a, keys, values, 0) +) AS wrap;