airborne12 commented on code in PR #41369:
URL: https://github.com/apache/doris/pull/41369#discussion_r1796616983
##########
fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java:
##########
@@ -430,6 +430,18 @@ private boolean processDropColumn(DropColumnClause
alterClause, OlapTable olapTa
throw new DdlException("Column does not exists: " +
dropColName);
}
+ // drop bloom filter column
+ Set<String> bfCols = olapTable.getCopiedBfColumns();
+ if (bfCols != null) {
+ Set<String> newBfCols = new HashSet<>();
+ for (String bfCol : bfCols) {
+ if (!bfCol.equalsIgnoreCase(dropColName)) {
+ newBfCols.add(bfCol);
+ }
+ }
+ olapTable.setBloomFilterInfo(newBfCols, olapTable.getBfFpp());
+ }
Review Comment:
may be this can be better
```
Set<String> bfCols = olapTable.getCopiedBfColumns();
if (bfCols != null) {
Set<String> newBfCols = bfCols.stream()
.filter(bfCol ->
!bfCol.equalsIgnoreCase(dropColName))
.collect(Collectors.toSet());
olapTable.setBloomFilterInfo(newBfCols, olapTable.getBfFpp());
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]