Skip to content

Commit

Permalink
Address review feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbutrovich committed Oct 2, 2024
1 parent ec64e4c commit 7a81f35
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl Accumulator for SparkBloomFilter {
if let ScalarValue::Int64(Some(value)) = v {
self.put_long(value);
} else {
unreachable!("")
unreachable!()
}
Ok(())
})
Expand Down
3 changes: 2 additions & 1 deletion native/core/src/execution/datafusion/util/spark_bit_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// specific language governing permissions and limitations
// under the License.

use crate::common::bit;
use arrow_buffer::ToByteSlice;
use std::iter::zip;

Expand Down Expand Up @@ -101,7 +102,7 @@ impl SparkBitArray {
}

pub fn num_words(num_bits: i32) -> i32 {
(num_bits as f64 / 64.0).ceil() as i32
bit::ceil(num_bits as usize, 64) as i32
}

#[cfg(test)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ pub struct SparkBloomFilter {
num_hash_functions: u32,
}

static DEFAULT_FPP: f64 = 0.03;

pub fn optimal_num_hash_functions(expected_items: i32, num_bits: i32) -> i32 {
cmp::max(
1,
Expand Down

0 comments on commit 7a81f35

Please sign in to comment.