pub struct PredicateOptions<'a> {
array_reader: Box<dyn ArrayReader>,
predicate: &'a mut dyn ArrowPredicate,
limit: Option<usize>,
total_rows: usize,
}Expand description
Options for ReadPlanBuilder::with_predicate_options.
Fields§
§array_reader: Box<dyn ArrayReader>§predicate: &'a mut dyn ArrowPredicate§limit: Option<usize>§total_rows: usizeImplementations§
Source§impl<'a> PredicateOptions<'a>
impl<'a> PredicateOptions<'a>
Sourcepub fn new(
array_reader: Box<dyn ArrayReader>,
predicate: &'a mut dyn ArrowPredicate,
) -> Self
pub fn new( array_reader: Box<dyn ArrayReader>, predicate: &'a mut dyn ArrowPredicate, ) -> Self
Create options for evaluating predicate against rows produced by
array_reader.
By default there is no match-count limit; the predicate is evaluated
over every row the reader yields. Use Self::with_limit to enable
early termination.
Sourcepub fn with_limit(self, limit: usize, total_rows: usize) -> Self
pub fn with_limit(self, limit: usize, total_rows: usize) -> Self
Stop scanning array_reader once limit matches have accumulated.
Performance optimization for LIMIT / TopK: when the cumulative
true_count reaches limit, the current filter batch is truncated
at the limit-th match and remaining batches are never decoded.
limit counts predicate matches, not output rows — callers applying
an offset must pass offset + limit.
total_rows is the row count array_reader would yield if iterated
to completion. It is used to pad un-evaluated trailing rows as “not
selected” so the returned RowSelection covers the full row group.
Only valid for the last predicate in a filter chain: intermediate predicates’ match counts do not map 1:1 to output rows.