From eef0e08fbd543071104cda612f574504671da67d Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Tue, 23 Jul 2019 13:04:26 +0300 Subject: [PATCH] Added test with LowCardinality(Nullable) to not-Nullable cast. --- .../0_stateless/00974_low_cardinality_cast.reference | 4 ++++ .../queries/0_stateless/00974_low_cardinality_cast.sql | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00974_low_cardinality_cast.reference create mode 100644 dbms/tests/queries/0_stateless/00974_low_cardinality_cast.sql diff --git a/dbms/tests/queries/0_stateless/00974_low_cardinality_cast.reference b/dbms/tests/queries/0_stateless/00974_low_cardinality_cast.reference new file mode 100644 index 00000000000..5c576f5dee6 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00974_low_cardinality_cast.reference @@ -0,0 +1,4 @@ +Hello +\N +Hello +Hello diff --git a/dbms/tests/queries/0_stateless/00974_low_cardinality_cast.sql b/dbms/tests/queries/0_stateless/00974_low_cardinality_cast.sql new file mode 100644 index 00000000000..e369a8c169e --- /dev/null +++ b/dbms/tests/queries/0_stateless/00974_low_cardinality_cast.sql @@ -0,0 +1,6 @@ +SELECT CAST('Hello' AS LowCardinality(Nullable(String))); +SELECT CAST(Null AS LowCardinality(Nullable(String))); +SELECT CAST(CAST('Hello' AS LowCardinality(Nullable(String))) AS String); +SELECT CAST(CAST(Null AS LowCardinality(Nullable(String))) AS String); -- { serverError 349 } +SELECT CAST(CAST('Hello' AS Nullable(String)) AS String); +SELECT CAST(CAST(Null AS Nullable(String)) AS String); -- { serverError 349 }