Skip to main content

PredicateOptions

Struct PredicateOptions 

Source
pub struct PredicateOptions<'a> {
    array_reader: Box<dyn ArrayReader>,
    predicate: &'a mut dyn ArrowPredicate,
    limit: Option<usize>,
    total_rows: usize,
}
Expand description

Fields§

§array_reader: Box<dyn ArrayReader>§predicate: &'a mut dyn ArrowPredicate§limit: Option<usize>§total_rows: usize

Implementations§

Source§

impl<'a> PredicateOptions<'a>

Source

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.

Source

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.

Auto Trait Implementations§

§

impl<'a> Freeze for PredicateOptions<'a>

§

impl<'a> !RefUnwindSafe for PredicateOptions<'a>

§

impl<'a> Send for PredicateOptions<'a>

§

impl<'a> !Sync for PredicateOptions<'a>

§

impl<'a> Unpin for PredicateOptions<'a>

§

impl<'a> UnsafeUnpin for PredicateOptions<'a>

§

impl<'a> !UnwindSafe for PredicateOptions<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> Ungil for T
where T: Send,