XinyuZeng commented on code in PR #3119:
URL: https://github.com/apache/arrow-rs/pull/3119#discussion_r1110973057
##########
parquet/src/bloom_filter/mod.rs:
##########
@@ -113,7 +116,48 @@ fn read_bloom_filter_header_and_length(
))
}
+const BITSET_MIN_LENGTH: usize = 32;
+const BITSET_MAX_LENGTH: usize = 128 * 1024 * 1024;
+
+#[inline]
+fn optimal_num_of_bytes(num_bytes: usize) -> usize {
+ let num_bytes = num_bytes.min(BITSET_MAX_LENGTH);
+ let num_bytes = num_bytes.max(BITSET_MIN_LENGTH);
+ num_bytes.next_power_of_two()
+}
+
+// see http://algo2.iti.kit.edu/documents/cacheefficientbloomfilters-jea.pdf
Review Comment:
@Jimexist Wondering why here we round num_bytes to next power of two?
parquet-mr just rounds to (k * BITS_PER_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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]