yabola commented on code in PR #1043:
URL: https://github.com/apache/parquet-mr/pull/1043#discussion_r1155973896


##########
parquet-column/src/main/java/org/apache/parquet/column/impl/ColumnWriterBase.java:
##########
@@ -97,7 +97,7 @@ abstract class ColumnWriterBase implements ColumnWriter {
       int optimalNumOfBits = 
BlockSplitBloomFilter.optimalNumOfBits(ndv.getAsLong(), fpp.getAsDouble());
       this.bloomFilter = new BlockSplitBloomFilter(optimalNumOfBits / 8, 
maxBloomFilterSize);
     } else {
-      this.bloomFilter = new BlockSplitBloomFilter(maxBloomFilterSize);
+      this.bloomFilter = BlockSplitBloomFilter.of(maxBloomFilterSize);

Review Comment:
   @wgtmac Thank you for the clear explanation! 
   I worry that if we modify it like this, it will reduces the ability of one 
constructor, that is, the initial size is `numbytes`, but the maximum does not 
exceed `UPPER_BOUND_BYTES`.
   I think it might be a problem of calling the constructor incorrectly in 
`ColumnWriterBase`.  As you said before, we can change to call 
`BlockSplitBloomFilter(int numBytes, int maximumBytes)` instead of 
`BlockSplitBloomFilter(int numBytes)`. 
   I'm not sure which way is better, what do you think about it?



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

Reply via email to