pub struct FilterPredicate { /* private fields */ }Expand description
A filtering predicate that can be applied to an Array
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
This predicate may be shorter than values. Rows beyond its length are not selected.
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.
This predicate may be shorter than the batch. Rows beyond its length are not selected.
Sourcepub fn count(&self) -> usize
pub fn count(&self) -> usize
Number of rows being selected based on 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.
§Panics
Panics if the input contains nulls and is shorter than this predicate.