Add test case

This commit is contained in:
jianmei zhang 2022-06-08 16:27:00 +08:00
parent 13231d6a85
commit d6b0bc2942
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,4 @@
CREATE TABLE default.t_index\n(\n `a` Int32,\n `b` String,\n INDEX i_a a TYPE minmax GRANULARITY 4,\n INDEX i_b b TYPE bloom_filter GRANULARITY 2\n)\nENGINE = MergeTree\nORDER BY a\nSETTINGS index_granularity = 8192
t_index i_a minmax a 4
t_index i_b bloom_filter b 2
t_index i_b bloom_filter b 2

View File

@ -0,0 +1,17 @@
drop table if exists t_index;
create table t_index(a int, b String) engine=MergeTree() order by a;
create index i_a on t_index(a) TYPE minmax GRANULARITY 4;
create index if not exists i_a on t_index(a) TYPE minmax GRANULARITY 2;
create index i_b on t_index(b) TYPE bloom_filter GRANULARITY 2;
show create table t_index;
select table, name, type, expr, granularity from system.data_skipping_indices where database = currentDatabase() and table = 't_index';
drop index i_a on t_index;
drop index if exists i_a on t_index;
select table, name, type, expr, granularity from system.data_skipping_indices where database = currentDatabase() and table = 't_index';
drop table t_index;