From cd547275578b3cba634efeaefb8f6ee3acbf5072 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 28 Nov 2014 05:29:35 +0300 Subject: [PATCH] dbms: added few tests [#METR-13933]. --- .../0_stateless/00087_distinct_of_empty_arrays.reference | 1 + .../queries/0_stateless/00087_distinct_of_empty_arrays.sql | 1 + .../0_stateless/00088_distinct_of_arrays_of_strings.reference | 3 +++ .../0_stateless/00088_distinct_of_arrays_of_strings.sql | 1 + 4 files changed, 6 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00087_distinct_of_empty_arrays.reference create mode 100644 dbms/tests/queries/0_stateless/00087_distinct_of_empty_arrays.sql create mode 100644 dbms/tests/queries/0_stateless/00088_distinct_of_arrays_of_strings.reference create mode 100644 dbms/tests/queries/0_stateless/00088_distinct_of_arrays_of_strings.sql diff --git a/dbms/tests/queries/0_stateless/00087_distinct_of_empty_arrays.reference b/dbms/tests/queries/0_stateless/00087_distinct_of_empty_arrays.reference new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00087_distinct_of_empty_arrays.reference @@ -0,0 +1 @@ +[] diff --git a/dbms/tests/queries/0_stateless/00087_distinct_of_empty_arrays.sql b/dbms/tests/queries/0_stateless/00087_distinct_of_empty_arrays.sql new file mode 100644 index 00000000000..2b0851b7d90 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00087_distinct_of_empty_arrays.sql @@ -0,0 +1 @@ +SELECT DISTINCT emptyArrayString() AS k FROM (SELECT * FROM system.numbers LIMIT 100000); diff --git a/dbms/tests/queries/0_stateless/00088_distinct_of_arrays_of_strings.reference b/dbms/tests/queries/0_stateless/00088_distinct_of_arrays_of_strings.reference new file mode 100644 index 00000000000..cdcf33bdad2 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00088_distinct_of_arrays_of_strings.reference @@ -0,0 +1,3 @@ +[] +['is_registred'] +['registration_month','user_login','is_registred'] diff --git a/dbms/tests/queries/0_stateless/00088_distinct_of_arrays_of_strings.sql b/dbms/tests/queries/0_stateless/00088_distinct_of_arrays_of_strings.sql new file mode 100644 index 00000000000..296c7de2959 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00088_distinct_of_arrays_of_strings.sql @@ -0,0 +1 @@ +SELECT DISTINCT arrayFilter(x -> notEmpty(x), arrayJoin([[''], ['is_registred'], ['registration_month','user_login','is_registred'], ['is_registred'], ['is_registred'], ['']]));