Skip to content

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

@xinghuayu007

Description

@xinghuayu007

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;

Metadata

Metadata

Assignees

Labels

Staleapi-reviewCategorizes an issue or PR as actively needing an API review.area/sql/compatibilityIssues or PRs related to the SQL compatibililtykind/api-changeCategorizes issue or PR as related to adding, removing, or otherwise changing an API

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions