pub struct FilterBuilder { /* private fields */ }Expand description
A builder to construct FilterPredicate
Implementations§
Source§impl FilterBuilder
impl FilterBuilder
Sourcepub fn new(filter: &BooleanArray) -> FilterBuilder
pub fn new(filter: &BooleanArray) -> FilterBuilder
Create a new FilterBuilder that can be used to construct a FilterPredicate
Sourcepub 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.
Sourcepub 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.
Sourcepub fn build(self) -> FilterPredicate
pub fn build(self) -> FilterPredicate
Construct the final FilterPredicate
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FilterBuilder
impl RefUnwindSafe for FilterBuilder
impl Send for FilterBuilder
impl Sync for FilterBuilder
impl Unpin for FilterBuilder
impl UnsafeUnpin for FilterBuilder
impl UnwindSafe for FilterBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more