gortiz commented on code in PR #8766:
URL: https://github.com/apache/pinot/pull/8766#discussion_r880702682


##########
pinot-core/src/test/java/org/apache/pinot/core/query/pruner/ColumnValueSegmentPrunerTest.java:
##########
@@ -148,17 +158,18 @@ public void testBloomFilterInPredicatePruning() {
     when(indexSegment.getDataSource("column")).thenReturn(dataSource);
     // Add support for bloom filter
     DataSourceMetadata dataSourceMetadata = mock(DataSourceMetadata.class);
-    BloomFilterReader bloomFilterReader = mock(BloomFilterReader.class);
+    BloomFilterReader bloomFilterReader = new BloomFilterReaderBuilder()

Review Comment:
   I have to remove the mock and use an actual object because the new 
implementation doesn't call `mightContain(String)` and instead calls 
`mightContain(long, long)`, which would make mocks quite more difficult to read.
   
   This new implementation has the problem that false positives may affect the 
tests, but the bloom filter created is larger than required, so the possibility 
is very small. Even more, this false positives are deterministic. So even if 
one false positive is found in future, we can just change the examples to use a 
set of values that doesn't produce a collision.



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

Reply via email to