pub enum BoundPredicate {
AlwaysTrue,
AlwaysFalse,
And(LogicalExpression<BoundPredicate, 2>),
Or(LogicalExpression<BoundPredicate, 2>),
Not(LogicalExpression<BoundPredicate, 1>),
Unary(UnaryExpression<BoundReference>),
Binary(BinaryExpression<BoundReference>),
Set(SetExpression<BoundReference>),
}Expand description
Bound predicate expression after binding to a schema.
Variants§
AlwaysTrue
An expression always evaluates to true.
AlwaysFalse
An expression always evaluates to false.
And(LogicalExpression<BoundPredicate, 2>)
An expression combined by AND, for example, a > 10 AND b < 20.
Or(LogicalExpression<BoundPredicate, 2>)
An expression combined by OR, for example, a > 10 OR b < 20.
Not(LogicalExpression<BoundPredicate, 1>)
An expression combined by NOT, for example, NOT (a > 10).
Unary(UnaryExpression<BoundReference>)
Unary expression, for example, a IS NULL.
Binary(BinaryExpression<BoundReference>)
Binary expression, for example, a > 10.
Set(SetExpression<BoundReference>)
Set predicates, for example, a IN (1, 2, 3).
Implementations§
Source§impl BoundPredicate
impl BoundPredicate
Sourcepub fn rewrite_not(self) -> BoundPredicate
pub fn rewrite_not(self) -> BoundPredicate
Simplifies the expression by removing NOT predicates,
directly negating the inner expressions instead. The transformation
applies logical laws (such as De Morgan’s laws) to
recursively negate and simplify inner expressions within NOT
predicates.
§Example
use std::ops::Not;
use iceberg::expr::{Bind, BoundPredicate, Reference};
use iceberg::spec::Datum;
// This would need to be bound first, but the concept is:
// let expression = bound_predicate.not();
// let result = expression.rewrite_not();Trait Implementations§
Source§impl Clone for BoundPredicate
impl Clone for BoundPredicate
Source§fn clone(&self) -> BoundPredicate
fn clone(&self) -> BoundPredicate
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BoundPredicate
impl Debug for BoundPredicate
Source§impl<'de> Deserialize<'de> for BoundPredicate
impl<'de> Deserialize<'de> for BoundPredicate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for BoundPredicate
impl Display for BoundPredicate
Source§impl PartialEq for BoundPredicate
impl PartialEq for BoundPredicate
Source§impl Serialize for BoundPredicate
impl Serialize for BoundPredicate
impl StructuralPartialEq for BoundPredicate
Auto Trait Implementations§
impl Freeze for BoundPredicate
impl RefUnwindSafe for BoundPredicate
impl Send for BoundPredicate
impl Sync for BoundPredicate
impl Unpin for BoundPredicate
impl UnwindSafe for BoundPredicate
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Forward to the method defined on the type
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Forward to the method defined on the type
Any.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.