Struct FilterPredicate
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: IterationStrategyImplementations§
§impl FilterPredicate
impl FilterPredicate
pub fn filter(&self, values: &dyn Array) -> Result<Arc<dyn Array>, ArrowError>
pub fn filter(&self, values: &dyn Array) -> Result<Arc<dyn Array>, ArrowError>
Selects rows from values based on this FilterPredicate
This predicate may be shorter than values. Rows beyond its length are not selected.
pub 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.
pub fn count(&self) -> usize
pub fn count(&self) -> usize
Number of rows being selected based on this FilterPredicate
pub 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.