pub struct PredicateRewriter { /* private fields */ }
Expand description
Rewrite a predicate expression in terms of statistics (min/max/null_counts)
for use as a PruningPredicate
.
Implementations§
Source§impl PredicateRewriter
impl PredicateRewriter
Sourcepub fn with_unhandled_hook(
self,
unhandled_hook: Arc<dyn UnhandledPredicateHook>,
) -> Self
pub fn with_unhandled_hook( self, unhandled_hook: Arc<dyn UnhandledPredicateHook>, ) -> Self
Set the unhandled hook to be used when a predicate can not be rewritten
Sourcepub fn rewrite_predicate_to_statistics_predicate(
&self,
expr: &Arc<dyn PhysicalExpr>,
schema: &Schema,
) -> Arc<dyn PhysicalExpr>
pub fn rewrite_predicate_to_statistics_predicate( &self, expr: &Arc<dyn PhysicalExpr>, schema: &Schema, ) -> Arc<dyn PhysicalExpr>
Translate logical filter expression into pruning predicate expression that will evaluate to FALSE if it can be determined no rows between the min/max values could pass the predicates.
Any predicates that can not be translated will be passed to unhandled_hook
.
Returns the pruning predicate as an PhysicalExpr
Notice: Does not handle phys_expr::InListExpr
greater than 20, which will fall back to calling unhandled_hook
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PredicateRewriter
impl !RefUnwindSafe for PredicateRewriter
impl !Send for PredicateRewriter
impl !Sync for PredicateRewriter
impl Unpin for PredicateRewriter
impl !UnwindSafe for PredicateRewriter
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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