pub struct FilterPredicate {
filter: BooleanArray,
count: usize,
strategy: IterationStrategy,
}Expand description
A filtering predicate that can be applied to an [Array]
Fields§
§filter: BooleanArray§count: usize§strategy: IterationStrategyPrecomputed strategy for iterating over the selected rows of this predicate
Implementations§
Source§impl FilterPredicate
impl FilterPredicate
Sourcepub fn filter(&self, values: &dyn Array) -> Result<ArrayRef, ArrowError>
pub fn filter(&self, values: &dyn Array) -> Result<ArrayRef, ArrowError>
Selects rows from values based on this FilterPredicate
Sourcepub fn filter_record_batch(
&self,
record_batch: &RecordBatch,
) -> Result<RecordBatch, ArrowError>
pub fn filter_record_batch( &self, record_batch: &RecordBatch, ) -> Result<RecordBatch, ArrowError>
Returns a filtered [RecordBatch] containing only the rows that are selected by this
FilterPredicate.
This is the equivalent of calling filter on each column of the [RecordBatch].
Sourcepub fn count(&self) -> usize
pub fn count(&self) -> usize
Number of rows being selected based on this FilterPredicate
Sourcepub(crate) fn selection(&self) -> FilterSelection<'_>
pub(crate) fn selection(&self) -> FilterSelection<'_>
Return a FilterSelection for iterating over the rows selected by
this FilterPredicate.
Sourcepub fn filter_nulls(&self, nulls: Option<&NullBuffer>) -> Option<NullBuffer>
pub fn filter_nulls(&self, nulls: Option<&NullBuffer>) -> Option<NullBuffer>
Filters the given nulls buffer using this predicate.
Returns None when there is nothing to track in the output, either
because the input nulls was None, the input had no nulls, or the
filtered result has no nulls. Otherwise returns the filtered
[NullBuffer] with its precomputed null count.