viirya commented on code in PR #3333:
URL: https://github.com/apache/arrow-rs/pull/3333#discussion_r1046341685
##########
parquet/src/bloom_filter/mod.rs:
##########
@@ -49,38 +49,82 @@ const SALT: [u32; 8] = [
/// Each block is 256 bits, broken up into eight contiguous "words", each
consisting of 32 bits.
/// Each word is thought of as an array of bits; each bit is either "set" or
"not set".
-type Block = [u32; 8];
-
-/// takes as its argument a single unsigned 32-bit integer and returns a block
in which each
-/// word has exactly one bit set.
-fn mask(x: u32) -> Block {
- let mut result = [0_u32; 8];
- for i in 0..8 {
- // wrapping instead of checking for overflow
- let y = x.wrapping_mul(SALT[i]);
- let y = y >> 27;
- result[i] = 1 << y;
+#[derive(Debug, Copy, Clone)]
Review Comment:
Have we used `Copy` and `Clone`?
--
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]