ClickHouse/tests/queries/0_stateless/00688_low_cardinality_nullable_cast.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
589 B
MySQL
Raw Normal View History

2019-05-29 16:37:55 +00:00
set allow_suspicious_low_cardinality_types = 1;
SELECT CAST(NULL, 'LowCardinality(Nullable(Int8))');
drop table if exists lc_null_int8_defnull;
CREATE TABLE lc_null_int8_defnull (val LowCardinality(Nullable(Int8)) DEFAULT NULL) ENGINE = MergeTree order by tuple();
insert into lc_null_int8_defnull values (1);
select * from lc_null_int8_defnull values;
alter table lc_null_int8_defnull add column val2 LowCardinality(Nullable(Int8)) DEFAULT NULL;
insert into lc_null_int8_defnull values (2, 3);
select * from lc_null_int8_defnull order by val;
drop table if exists lc_null_int8_defnull;