From 1960f9997ec32874758c83fdd761336adc9452ba Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 19 Dec 2022 08:51:09 +0100 Subject: [PATCH] Add a test for #34669 --- ...02512_array_join_name_resolution.reference | 2 ++ .../02512_array_join_name_resolution.sql | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 tests/queries/0_stateless/02512_array_join_name_resolution.reference create mode 100644 tests/queries/0_stateless/02512_array_join_name_resolution.sql diff --git a/tests/queries/0_stateless/02512_array_join_name_resolution.reference b/tests/queries/0_stateless/02512_array_join_name_resolution.reference new file mode 100644 index 00000000000..62263461e0d --- /dev/null +++ b/tests/queries/0_stateless/02512_array_join_name_resolution.reference @@ -0,0 +1,2 @@ +Hello test +World test diff --git a/tests/queries/0_stateless/02512_array_join_name_resolution.sql b/tests/queries/0_stateless/02512_array_join_name_resolution.sql new file mode 100644 index 00000000000..5bcea967791 --- /dev/null +++ b/tests/queries/0_stateless/02512_array_join_name_resolution.sql @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS x; +CREATE TABLE x ( `arr.key` Array(String), `arr.value` Array(String), `n` String ) ENGINE = Memory; +INSERT INTO x VALUES (['Hello', 'World'], ['abc', 'def'], 'test'); + +SELECT + key, + any(toString(n)) +FROM +( + SELECT + arr.key AS key, + n + FROM x + ARRAY JOIN arr +) +GROUP BY key +ORDER BY key; + +DROP TABLE x;