incubator-doris Unified the grammer style of create/drop bitmap and bloomfilter index

wn9m85ua  于 2022-04-22  发布在  Java
关注(0)|答案(1)|浏览(120)

For bitmap index, now Doris supports 2 kinds of ways to create or drop, as the follow:

a1. CREATE INDEX <index_name> ON <db_name>.<table_name> (<col_name>) USING BITMAP COMMENT 'your comment';

a2. DROP INDEX <index_name> ON <db_name>.<table_name>;

b1. ALTER TABLE <db_name>.<table_name> ADD INDEX <index_name> (<col_name>) USING BITMAP COMMENT 'your comment';

b2. ALTER TABLE <db_name>.<table_name> DROP INDEX <index_name>;

But for bloom filter, only one different kind of way to create or drop, as the follow:

c1. ALTER TABLE <db_name>.<table_name> SET ("bloom_filter_columns"="col1,col2,col3");

c2. ALTER TABLE <db_name>.<table_name> DROP COLUMN col2 PROPERTIES ("bloom_filter_columns"="col1,col2,col3");

I think, it is good to unified the grammer style of create/drop bitmap and bloomfilter index, as the follow:

a. CREATE INDEX <index_name> ON <db_name>.<table_name> (<col_name>) USING BLOOMFILTER COMMENT 'your comment' properties ("BLOOM_FILTER_FPP"="0.05");

b. DROP INDEX <index_name> ON <db_name>.<table_name>;

c. SHOW INDEX FROM <db_name>.<table_name>;

To be compatible with c2 grammar style, when ALTER TABLE <db_name>.<table_name> SET ("bloom_filter_columns"="col1,col2,col3"), the index name is default as "__bloomfilter" and comment is null;

相关问题