Skip to content

Conversation

@xinghuayu007
Copy link
Contributor

Proposed changes

This PR is to unified the grammer style of create/drop bitmap and bloomfilter index. It supports to create bloomfilter index by using the grammar style of "create index <index_name> on <table_name> using bloomfilter comment ' ' properties ('bloom_filter_fpp'='0.04')". It is also compatible with the olde style of "alter table set ('bloom_filter_columns'='k1,k2', 'bloom_filter_fpp'='0.04')". Issue: #4193

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • [] Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] Documentation Update (if none of the other choices apply)
  • [] Code refactor (Modify the code structure, format the code, etc...)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have create an issue on #ISSUE, and have described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • If this change need a document change, I have updated the document
  • Any dependent changes have been merged

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@xinghuayu007 xinghuayu007 reopened this Aug 4, 2020
public static final ScalarType HLL = ScalarType.createHllType();
public static final ScalarType CHAR = (ScalarType) ScalarType.createCharType(-1);
public static final ScalarType BITMAP = new ScalarType(PrimitiveType.BITMAP);
public static final ScalarType BLOOMFILTER = new ScalarType(PrimitiveType.BLOOMFILTER);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add a new type bloomfilter
This bitmap is Type Bitmap, not index bitmap

processDropIndex((DropIndexClause) alterClause, olapTable, newIndexes);
DropIndexClause clause = (DropIndexClause) alterClause;
if (getIndexTypeByName(clause, olapTable) == IndexDef.IndexType.BLOOMFILTER) {
createBfJob(db.getId(), olapTable, indexSchemaMap, propertyMap, newIndexes, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createBfJob is right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createBfJob is a new Function that responsible for bloomfilter index create/drop

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, but createBfJob is ambiguous

@morningman morningman added the api-review Categorizes an issue or PR as actively needing an API review. label Aug 8, 2020
1. 目前只支持bitmap 索引
1. 目前支持bitmap,bloomfilter 索引
2. BITMAP 索引仅在单列上创建
3. BLOOMFILTER索引可以在多列上创建,当列为空时表示删除索引;属性bloom_filter_fpp表示期望误差率
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent to index 2.

LOG.info("finished to create schema change job: {}", schemaChangeJob.getJobId());
}

private void createBfJob(long dbId, OlapTable olapTable, Map<Long, LinkedList<Column>> indexSchemaMap,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you reuse the old logic in createJob

processDropIndex((DropIndexClause) alterClause, olapTable, newIndexes);
DropIndexClause clause = (DropIndexClause) alterClause;
if (getIndexTypeByName(clause, olapTable) == IndexDef.IndexType.BLOOMFILTER) {
createBfJob(db.getId(), olapTable, indexSchemaMap, propertyMap, newIndexes, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, but createBfJob is ambiguous

}
}
if (olapTable.getBfName() == indexName) {
found = new Index();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment to explain why a new Index was created here

BiteTheDDDDt pushed a commit to BiteTheDDDDt/incubator-doris that referenced this pull request Sep 1, 2025
…ailure (apache#53952) (apache#4247)

1. New tablet cloud be nullptr when get tablet action failed, take it
into account.
2. Fix grammer error of the method signature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-review Categorizes an issue or PR as actively needing an API review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants