From 25e7e632079808e376bf5363ad14af2e1aa596e6 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 10 Feb 2019 00:18:33 +0300 Subject: [PATCH] Added a test --- .../00904_array_with_constant_2.reference | 40 +++++++++++++++++++ .../00904_array_with_constant_2.sql | 4 ++ 2 files changed, 44 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00904_array_with_constant_2.reference create mode 100644 dbms/tests/queries/0_stateless/00904_array_with_constant_2.sql diff --git a/dbms/tests/queries/0_stateless/00904_array_with_constant_2.reference b/dbms/tests/queries/0_stateless/00904_array_with_constant_2.reference new file mode 100644 index 00000000000..b2e919a5a46 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00904_array_with_constant_2.reference @@ -0,0 +1,40 @@ +[0,0,0] +[1,1,1] +[2,2,2] +[3,3,3] +[4,4,4] +[5,5,5] +[6,6,6] +[7,7,7] +[8,8,8] +[9,9,9] +[] +['Hello'] +['Hello','Hello'] +['Hello','Hello','Hello'] +['Hello','Hello','Hello','Hello'] +['Hello','Hello','Hello','Hello','Hello'] +['Hello','Hello','Hello','Hello','Hello','Hello'] +['Hello','Hello','Hello','Hello','Hello','Hello','Hello'] +['Hello','Hello','Hello','Hello','Hello','Hello','Hello','Hello'] +['Hello','Hello','Hello','Hello','Hello','Hello','Hello','Hello','Hello'] +[] +['Hello'] +[NULL,NULL] +[] +[NULL] +['Hello','Hello'] +[] +['Hello'] +[NULL,NULL] +[] +[] +[[]] +[[],[]] +[[],[],[]] +[[],[],[],[]] +[[],[],[],[],[]] +[[],[],[],[],[],[]] +[[],[],[],[],[],[],[]] +[[],[],[],[],[],[],[],[]] +[[],[],[],[],[],[],[],[],[]] diff --git a/dbms/tests/queries/0_stateless/00904_array_with_constant_2.sql b/dbms/tests/queries/0_stateless/00904_array_with_constant_2.sql new file mode 100644 index 00000000000..6e578a12b88 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00904_array_with_constant_2.sql @@ -0,0 +1,4 @@ +SELECT arrayWithConstant(3, number) FROM numbers(10); +SELECT arrayWithConstant(number, 'Hello') FROM numbers(10); +SELECT arrayWithConstant(number % 3, number % 2 ? 'Hello' : NULL) FROM numbers(10); +SELECT arrayWithConstant(number, []) FROM numbers(10);