Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ impl NativeDeserializeDataTransform {
let mut bitmap = MutableBitmap::from_len_zeroed(probe_block.num_rows());
let probe_column = probe_block.get_last_column().clone();
// Apply the filter to the probe column.
ExprBloomFilter::new(filter.clone()).apply(probe_column, &mut bitmap)?;
ExprBloomFilter::new(filter).apply(probe_column, &mut bitmap)?;

let unset_bits = bitmap.null_count();
if unset_bits == bitmap.len() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ impl DeserializeDataTransform {
let probe_column = probe_block_entry.to_column();

// Apply bloom filter
ExprBloomFilter::new(filter.clone()).apply(probe_column, &mut bitmap)?;
ExprBloomFilter::new(filter).apply(probe_column, &mut bitmap)?;
bitmaps.push(bitmap);
}
if !bitmaps.is_empty() {
Expand Down
8 changes: 4 additions & 4 deletions src/query/storages/fuse/src/pruning/expr_bloom_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ use xorf::BinaryFuse16;
use xorf::Filter;

/// Bloom filter for runtime filtering of data rows.
pub struct ExprBloomFilter {
filter: BinaryFuse16,
pub struct ExprBloomFilter<'a> {
filter: &'a BinaryFuse16,
}

impl ExprBloomFilter {
impl<'a> ExprBloomFilter<'a> {
/// Create a new bloom filter.
pub fn new(filter: BinaryFuse16) -> Self {
pub fn new(filter: &'a BinaryFuse16) -> ExprBloomFilter<'a> {
Self { filter }
}

Expand Down