GSharayu commented on a change in pull request #7007:
URL: https://github.com/apache/incubator-pinot/pull/7007#discussion_r644179439



##########
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:
       done!

##########
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:
       updated!

##########
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:
       done!

##########
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:
       done!




-- 
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]

Reply via email to