siddharthteotia commented on code in PR #8961:
URL: https://github.com/apache/pinot/pull/8961#discussion_r919457077
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/bloomfilter/BloomFilterHandler.java:
##########
@@ -136,17 +138,132 @@ private void
createBloomFilterForColumn(SegmentDirectory.Writer segmentWriter, C
BloomFilterConfig bloomFilterConfig = _bloomFilterConfigs.get(columnName);
LOGGER.info("Creating new bloom filter for segment: {}, column: {} with
config: {}", segmentName, columnName,
bloomFilterConfig);
- try (BloomFilterCreator bloomFilterCreator =
indexCreatorProvider.newBloomFilterCreator(
-
IndexCreationContext.builder().withIndexDir(indexDir).withColumnMetadata(columnMetadata)
- .build().forBloomFilter(bloomFilterConfig));
- Dictionary dictionary = getDictionaryReader(columnMetadata,
segmentWriter)) {
- int length = dictionary.length();
- for (int i = 0; i < length; i++) {
- bloomFilterCreator.add(dictionary.getStringValue(i));
+
+ if (columnMetadata.hasDictionary()) {
Review Comment:
(nit) suggest separating this into different methods for readability.
Something like ....
```
createBloomFilterOnDictColumn
createBloomFilterOnNoDictSVColumn
createBloomFilterOnNoDictMVColumn
```
--
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]