You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by "yabola (via GitHub)" <gi...@apache.org> on 2023/03/21 06:05:19 UTC

[GitHub] [parquet-mr] yabola commented on a diff in pull request #1043: PARQUET-2260 Bloom filter size shouldn't be larger than maxBytes in the configuration

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


##########
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:
   Yes, but it guarantees the maximum bytes size, but it cannot be guaranteed to be a power of 2. I am afraid that there will be a problem here.



-- 
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: dev-unsubscribe@parquet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org