From 0323a749429111c18283749a06cdafd6bd6e50b6 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 30 Dec 2016 08:17:55 +0300 Subject: [PATCH] Added test [#METR-19266]. --- .../0_stateless/00406_tuples_with_nulls.reference | 15 +++++++++++++++ .../0_stateless/00406_tuples_with_nulls.sql | 2 ++ 2 files changed, 17 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00406_tuples_with_nulls.reference create mode 100644 dbms/tests/queries/0_stateless/00406_tuples_with_nulls.sql diff --git a/dbms/tests/queries/0_stateless/00406_tuples_with_nulls.reference b/dbms/tests/queries/0_stateless/00406_tuples_with_nulls.reference new file mode 100644 index 00000000000..93f172151dc --- /dev/null +++ b/dbms/tests/queries/0_stateless/00406_tuples_with_nulls.reference @@ -0,0 +1,15 @@ +┌─tuple─────────┐ +│ (0,NULL,NULL) │ +│ (1,1,'1') │ +│ (2,2,NULL) │ +│ (3,NULL,'1') │ +│ (4,1,NULL) │ +│ (5,2,'1') │ +│ (6,NULL,NULL) │ +│ (7,1,'1') │ +│ (8,2,NULL) │ +│ (9,NULL,'1') │ +└───────────────┘ +┌──x─┬─y──────┐ +│ \N │ (NULL) │ +└────┴────────┘ diff --git a/dbms/tests/queries/0_stateless/00406_tuples_with_nulls.sql b/dbms/tests/queries/0_stateless/00406_tuples_with_nulls.sql new file mode 100644 index 00000000000..a947e6f788e --- /dev/null +++ b/dbms/tests/queries/0_stateless/00406_tuples_with_nulls.sql @@ -0,0 +1,2 @@ +SELECT (number, nullIf(number % 3, 0), toString(nullIf(number % 2, 0))) AS tuple FROM system.numbers LIMIT 10 FORMAT PrettyCompactNoEscapes; +SELECT NULL AS x, tuple(NULL) AS y FORMAT PrettyCompactNoEscapes;