apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
12.22k stars 3.19k forks source link

Unified the grammer style of create/drop bitmap and bloomfilter index #4193

Open xinghuayu007 opened 4 years ago

xinghuayu007 commented 4 years ago

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

a1. CREATE INDEX ON . () USING BITMAP COMMENT 'your comment';

a2. DROP INDEX ON .;

b1. ALTER TABLE . ADD INDEX () USING BITMAP COMMENT 'your comment';

b2. ALTER TABLE . DROP INDEX ;

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

c1. ALTER TABLE . SET ("bloom_filter_columns"="col1,col2,col3");

c2. ALTER TABLE . 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 ON . () USING BLOOMFILTER COMMENT 'your comment' properties ("BLOOM_FILTER_FPP"="0.05");

b. DROP INDEX ON .;

c. SHOW INDEX FROM .;

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

imay commented 4 years ago

It looks good to me