ClickHouse/tests/queries/0_stateless/00688_low_cardinality_nullable_cast.sql
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

13 lines
589 B
SQL

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;