diff --git a/dbms/tests/queries/0_stateless/00176_if_string_arrays.reference b/dbms/tests/queries/0_stateless/00176_if_string_arrays.reference new file mode 100644 index 00000000000..cccc0352df9 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00176_if_string_arrays.reference @@ -0,0 +1,100 @@ +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +['abc'] +['Hello','World'] +[] +['Hello','','World!'] +[] +['Hello','','World!'] +[] +['Hello','','World!'] +[] +['Hello','','World!'] +[] +['Hello','','World!'] +[] +['Hello','','World!'] +[] +['Hello','','World!'] +[] +['Hello','','World!'] +[] +['Hello','','World!'] +[] +['Hello','','World!'] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] +['',''] +[''] diff --git a/dbms/tests/queries/0_stateless/00176_if_string_arrays.sql b/dbms/tests/queries/0_stateless/00176_if_string_arrays.sql new file mode 100644 index 00000000000..4f752b47cad --- /dev/null +++ b/dbms/tests/queries/0_stateless/00176_if_string_arrays.sql @@ -0,0 +1,12 @@ +SELECT number % 2 ? ['Hello', 'World'] : ['abc'] FROM system.numbers LIMIT 10; +SELECT number % 2 ? materialize(['Hello', 'World']) : ['abc'] FROM system.numbers LIMIT 10; +SELECT number % 2 ? ['Hello', 'World'] : materialize(['abc']) FROM system.numbers LIMIT 10; +SELECT number % 2 ? materialize(['Hello', 'World']) : materialize(['abc']) FROM system.numbers LIMIT 10; + +SELECT number % 2 ? ['Hello', '', 'World!'] : emptyArrayString() FROM system.numbers LIMIT 10; +SELECT number % 2 ? materialize(['Hello', '', 'World!']) : emptyArrayString() FROM system.numbers LIMIT 10; + +SELECT number % 2 ? [''] : ['', ''] FROM system.numbers LIMIT 10; +SELECT number % 2 ? materialize(['']) : ['', ''] FROM system.numbers LIMIT 10; +SELECT number % 2 ? [''] : materialize(['', '']) FROM system.numbers LIMIT 10; +SELECT number % 2 ? materialize(['']) : materialize(['', '']) FROM system.numbers LIMIT 10;