CuteChuanChuan commented on code in PR #9877:
URL: https://github.com/apache/arrow-rs/pull/9877#discussion_r3196283079
##########
parquet/src/file/properties.rs:
##########
@@ -1363,6 +1429,81 @@ impl Default for BloomFilterProperties {
}
}
+impl BloomFilterProperties {
+ /// Returns a new [`BloomFilterPropertiesBuilder`] for constructing
+ /// [`BloomFilterProperties`] with custom values.
+ pub fn builder() -> BloomFilterPropertiesBuilder {
+ BloomFilterPropertiesBuilder::new()
+ }
+}
+
+/// Builder for [`BloomFilterProperties`].
+///
+/// Use [`BloomFilterProperties::builder`] or
[`BloomFilterPropertiesBuilder::new`]
+/// as the entry point. Unset fields fall back to [`DEFAULT_BLOOM_FILTER_FPP`]
+/// and [`DEFAULT_BLOOM_FILTER_NDV`] at build time.
Review Comment:
Good call — added concrete defaults and a worked example to `with_max_ndv`
in 6a2eacb:
- `with_fpp` now states the default is `0.05` (5%).
- `with_max_ndv` documents the default of `1_048_576` and shows that with
the default fpp this reserves ~1 MiB per column for the filter bitset, with the
full derivation: `num_bits = -8 * ndv / ln(1 - fpp^(1/8))`, then
`next_power_of_two`
--
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]