pub trait FactorizedPredicate: Send + Sync {
// Required methods
fn evaluate(
&self,
chunk: &FactorizedChunk,
level: usize,
physical_idx: usize,
) -> bool;
fn target_level(&self) -> Option<usize>;
// Provided method
fn evaluate_batch(
&self,
chunk: &FactorizedChunk,
level: usize,
) -> LevelSelection { ... }
}Expand description
A predicate that can be evaluated on factorized data at a specific level.
Unlike regular predicates that evaluate on flat DataChunks, factorized predicates work directly on factorized levels for O(physical) evaluation.
Required Methods§
Sourcefn target_level(&self) -> Option<usize>
fn target_level(&self) -> Option<usize>
Returns the level this predicate operates on.
Returns None for predicates that span multiple levels.
Provided Methods§
Sourcefn evaluate_batch(
&self,
chunk: &FactorizedChunk,
level: usize,
) -> LevelSelection
fn evaluate_batch( &self, chunk: &FactorizedChunk, level: usize, ) -> LevelSelection
Evaluates the predicate for all physical indices at a level.
Returns a LevelSelection representing which indices pass.
Default implementation calls evaluate for each index.