diff --git a/src/index/src/bloom_filter/applier.rs b/src/index/src/bloom_filter/applier.rs index 30c3244c203e..28a7291922d3 100644 --- a/src/index/src/bloom_filter/applier.rs +++ b/src/index/src/bloom_filter/applier.rs @@ -13,36 +13,21 @@ // limitations under the License. use std::collections::BTreeMap; -use std::ops::Range; -use async_trait::async_trait; -use fastbloom::BloomFilter; use parquet::arrow::arrow_reader::RowSelection; use parquet::file::metadata::RowGroupMetaData; -use super::error::Result; -use super::{BloomFilterMeta, BloomFilterSegmentLocation, Bytes}; - -// format -#[async_trait] -pub trait BloomFilterReader { - async fn range_read(&mut self, offset: u64, size: u32) -> Result>; - - async fn read_vec(&mut self, ranges: &[Range]) -> Result>>; - - async fn metadata(&mut self) -> Result; - - async fn bloom_filter(&mut self, loc: &BloomFilterSegmentLocation) -> Result; -} -// end of format +use crate::bloom_filter::error::Result; +use crate::bloom_filter::reader::BloomFilterReader; +use crate::bloom_filter::{BloomFilterMeta, BloomFilterSegmentLocation, Bytes}; pub struct BloomFilterApplier { - reader: Box, + reader: Box, meta: BloomFilterMeta, } impl BloomFilterApplier { - pub async fn new(mut reader: Box) -> Result { + pub async fn new(mut reader: Box) -> Result { let meta = reader.metadata().await?; Ok(Self { reader, meta })