adriangb commented on code in PR #11641:
URL: https://github.com/apache/arrow-rs/pull/11641#discussion_r4569715561
##########
parquet/src/bloom_filter/mod.rs:
##########
@@ -563,6 +586,60 @@ impl Sbbf {
self.0[block_index].check(hash as u32)
}
+ /// Same result as [`Self::check_hash`], without data-dependent branches.
+ #[cfg_attr(not(any(feature = "arrow", test)), expect(dead_code))]
+ #[inline(always)]
+ fn check_hash_branch_free(&self, hash: u64) -> bool {
+ let block_index = self.hash_to_block_index(hash);
+ self.0[block_index].check_branch_free(hash as u32)
+ }
+
+ /// Checks precomputed 64-bit hashes (see [`Self::insert_hash`]) in bulk,
+ /// without data-dependent branches.
+ ///
+ /// Bit `i` of the result is set if `hashes[i]` may be in the filter.
+ #[cfg(feature = "arrow")]
+ pub fn check_hashes(&self, hashes: &[u64]) -> arrow_buffer::BooleanBuffer {
Review Comment:
Handled as per your suggestion in 0cc21e1a3. I agree a followup should make
`Sbbf::new` return an error.
--
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]