Struct FilterBuilder
pub struct FilterBuilder {
filter: BooleanArray,
count: usize,
strategy: IterationStrategy,
}Expand description
A builder to construct FilterPredicate
Fields§
§filter: BooleanArray§count: usize§strategy: IterationStrategyImplementations§
§impl FilterBuilder
impl FilterBuilder
pub fn new(filter: &BooleanArray) -> FilterBuilder
pub fn new(filter: &BooleanArray) -> FilterBuilder
Create a new FilterBuilder that can be used to construct a FilterPredicate
pub fn optimize(self) -> FilterBuilder
pub fn optimize(self) -> FilterBuilder
Compute an optimized representation of the provided filter mask that can be
applied to an array more quickly.
When filtering multiple arrays (e.g. a RecordBatch or a
StructArray with multiple fields), optimizing the filter can provide
significant performance benefits.
However, optimization takes time and can have a larger memory footprint than the original mask, so it is often faster to filter a single array, without filter optimization.
pub fn is_optimize_beneficial(data_type: &DataType) -> bool
pub fn is_optimize_beneficial(data_type: &DataType) -> bool
Determines if calling FilterBuilder::optimize is beneficial for the given type even when filtering just a single array.
See FilterBuilder::optimize for more details.
pub fn build(self) -> FilterPredicate
pub fn build(self) -> FilterPredicate
Construct the final FilterPredicate