Jackie-Jiang commented on a change in pull request #7007:
URL: https://github.com/apache/incubator-pinot/pull/7007#discussion_r644149657
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/query/pruner/ColumnValueSegmentPruner.java
##########
@@ -251,6 +251,7 @@ private boolean pruneInPredicate(IndexSegment segment,
InPredicate inPredicate,
assert dataSource != null;
DataSourceMetadata dataSourceMetadata = dataSource.getDataSourceMetadata();
List<String> values = inPredicate.getValues();
+ BloomFilterReader bloomFilter = dataSource.getBloomFilter();
Review comment:
(nit) Move this line to line 268 for readability
##########
File path:
pinot-core/src/test/java/org/apache/pinot/core/query/pruner/ColumnValueSegmentPrunerTest.java
##########
@@ -133,6 +134,38 @@ public void testPartitionPruning() {
assertTrue(runPruner(indexSegment, "SELECT COUNT(*) FROM testTable WHERE
column = 0 OR column = 10"));
}
+ @Test
+ public void testBloomFilterInPredicatePruning() {
+ Map<String, Object> properties = new HashMap<>();
+ //override default value
+ properties.put(PRUNER.IN_PREDICATE_THRESHOLD, 5);
Review comment:
```suggestion
properties.put(ColumnValueSegmentPruner.IN_PREDICATE_THRESHOLD, 5);
```
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/query/pruner/ColumnValueSegmentPruner.java
##########
@@ -262,6 +263,14 @@ private boolean pruneInPredicate(IndexSegment segment,
InPredicate inPredicate,
return false;
}
}
+
+ //Check for Bloom Filter
+ if(bloomFilter != null) {
Review comment:
Please follow the code style:
https://docs.pinot.apache.org/developers/developers-and-contributors/code-setup
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/query/pruner/ColumnValueSegmentPruner.java
##########
@@ -262,6 +263,14 @@ private boolean pruneInPredicate(IndexSegment segment,
InPredicate inPredicate,
return false;
}
}
+
+ //Check for Bloom Filter
+ if(bloomFilter != null) {
+ for (String value : values) {
+ if(bloomFilter.mightContain(value)) return false;
Review comment:
Braces over if block
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]