ClickHouse/tests/queries/0_stateless/00718_low_cardinaliry_alter.sql

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

19 lines
862 B
MySQL
Raw Normal View History

2019-05-29 16:37:55 +00:00
set allow_suspicious_low_cardinality_types = 1;
drop table if exists tab_00718;
create table tab_00718 (a String, b LowCardinality(UInt32)) engine = MergeTree order by a;
insert into tab_00718 values ('a', 1);
select *, toTypeName(b) from tab_00718;
alter table tab_00718 modify column b UInt32;
select *, toTypeName(b) from tab_00718;
alter table tab_00718 modify column b LowCardinality(UInt32);
select *, toTypeName(b) from tab_00718;
2024-07-22 05:45:57 +00:00
alter table tab_00718 modify column b LowCardinality(String);
select *, toTypeName(b) from tab_00718;
alter table tab_00718 modify column b LowCardinality(UInt32);
select *, toTypeName(b) from tab_00718;
alter table tab_00718 modify column b String;
select *, toTypeName(b) from tab_00718;
alter table tab_00718 modify column b LowCardinality(UInt32);
select *, toTypeName(b) from tab_00718;
drop table if exists tab_00718;