pub struct EncodedDomainEvaluator { /* private fields */ }Expand description
Evaluates column predicates against row-group statistics to avoid unnecessary decoding.
Implementations§
Source§impl EncodedDomainEvaluator
impl EncodedDomainEvaluator
Sourcepub fn new(predicates: Vec<ColumnPredicate>) -> Self
pub fn new(predicates: Vec<ColumnPredicate>) -> Self
Create a new evaluator with the given set of column predicates.
Sourcepub fn evaluate<F>(&self, stats_fn: F) -> RowGroupVerdict
pub fn evaluate<F>(&self, stats_fn: F) -> RowGroupVerdict
Evaluate a single row group’s column statistics.
stats_fn is called with each predicate’s column name and should
return Some((min, max)) if statistics are available for that
column in this row group, or None if unknown.
§Returns
RowGroupVerdict::Skipif any predicate definitively excludes the row group.RowGroupVerdict::AllMatchif all predicates definitively match. Note:AllMatchmeans every row satisfies the filter, so filter evaluation can be skipped. However, the row group still must be decoded if any filter column appears in the SELECT projection (callers must check this separately). When stats are unavailable for any predicate column, the verdict is downgraded toDecodebecause we cannot prove all-match.RowGroupVerdict::Decodeotherwise.
Sourcepub fn evaluate_batch<F>(
&self,
num_row_groups: usize,
stats_fn: F,
) -> Vec<RowGroupVerdict>
pub fn evaluate_batch<F>( &self, num_row_groups: usize, stats_fn: F, ) -> Vec<RowGroupVerdict>
Batch evaluation: given a list of row groups with their stats, produce a verdict for each.
row_group_stats is a slice of closures or a single closure that
takes (row_group_index, column_name) and returns stats.
Trait Implementations§
Source§impl Clone for EncodedDomainEvaluator
impl Clone for EncodedDomainEvaluator
Source§fn clone(&self) -> EncodedDomainEvaluator
fn clone(&self) -> EncodedDomainEvaluator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EncodedDomainEvaluator
impl RefUnwindSafe for EncodedDomainEvaluator
impl Send for EncodedDomainEvaluator
impl Sync for EncodedDomainEvaluator
impl Unpin for EncodedDomainEvaluator
impl UnsafeUnpin for EncodedDomainEvaluator
impl UnwindSafe for EncodedDomainEvaluator
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more