From b5004980adc5440592e62ce5a218afaaa531429b Mon Sep 17 00:00:00 2001 From: Denis Zhuravlev Date: Fri, 16 Oct 2020 19:28:07 -0300 Subject: [PATCH] test for the bug 8580 --- .../01518_cast_nullable_virtual_system_column.reference | 1 + .../01518_cast_nullable_virtual_system_column.sql | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 tests/queries/0_stateless/01518_cast_nullable_virtual_system_column.reference create mode 100644 tests/queries/0_stateless/01518_cast_nullable_virtual_system_column.sql diff --git a/tests/queries/0_stateless/01518_cast_nullable_virtual_system_column.reference b/tests/queries/0_stateless/01518_cast_nullable_virtual_system_column.reference new file mode 100644 index 00000000000..059d6268017 --- /dev/null +++ b/tests/queries/0_stateless/01518_cast_nullable_virtual_system_column.reference @@ -0,0 +1 @@ +all tests passed diff --git a/tests/queries/0_stateless/01518_cast_nullable_virtual_system_column.sql b/tests/queries/0_stateless/01518_cast_nullable_virtual_system_column.sql new file mode 100644 index 00000000000..6366bae7b37 --- /dev/null +++ b/tests/queries/0_stateless/01518_cast_nullable_virtual_system_column.sql @@ -0,0 +1,7 @@ +SELECT database FROM system.tables WHERE database LIKE '%' format Null; +SELECT database AS db FROM system.tables WHERE db LIKE '%' format Null; +SELECT CAST(database, 'String') AS db FROM system.tables WHERE db LIKE '%' format Null; +SELECT CAST('a string', 'Nullable(String)') AS str WHERE str LIKE '%' format Null; +SELECT CAST(database, 'Nullable(String)') AS ndb FROM system.tables WHERE ndb LIKE '%' format Null; +SELECT 'all tests passed'; +