diff --git a/dbms/tests/queries/0_stateless/00688_low_cardinality_nullable_cast.reference b/dbms/tests/queries/0_stateless/00688_low_cardinality_nullable_cast.reference new file mode 100644 index 00000000000..660484bc632 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00688_low_cardinality_nullable_cast.reference @@ -0,0 +1,4 @@ +\N +1 +1 \N +2 3 diff --git a/dbms/tests/queries/0_stateless/00688_low_cardinality_nullable_cast.sql b/dbms/tests/queries/0_stateless/00688_low_cardinality_nullable_cast.sql new file mode 100644 index 00000000000..a738117b449 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00688_low_cardinality_nullable_cast.sql @@ -0,0 +1,13 @@ +set allow_experimental_low_cardinality_type = 1; + +SELECT CAST(NULL, 'LowCardinality(Nullable(Int8))'); + +drop table if exists test.lc_null_int8_defnull; +CREATE TABLE test.lc_null_int8_defnull (val LowCardinality(Nullable(Int8)) DEFAULT NULL) ENGINE = MergeTree order by tuple(); +insert into test.lc_null_int8_defnull values (1); +select * from test.lc_null_int8_defnull values; +alter table test.lc_null_int8_defnull add column val2 LowCardinality(Nullable(Int8)) DEFAULT NULL; +insert into test.lc_null_int8_defnull values (2, 3); +select * from test.lc_null_int8_defnull order by val; +drop table if exists test.lc_null_int8_defnull; +