#[non_exhaustive]#[repr(u16)]pub enum PredicateOperator {
Show 14 variants
IsNull = 101,
NotNull = 102,
IsNan = 103,
NotNan = 104,
LessThan = 201,
LessThanOrEq = 202,
GreaterThan = 203,
GreaterThanOrEq = 204,
Eq = 205,
NotEq = 206,
StartsWith = 207,
NotStartsWith = 208,
In = 301,
NotIn = 302,
}
Expand description
Predicate operators used in expressions.
The discriminant of this enum is used for determining the type of the operator, see
PredicateOperator::is_unary
, PredicateOperator::is_binary
, PredicateOperator::is_set
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
IsNull = 101
NotNull = 102
IsNan = 103
NotNan = 104
LessThan = 201
LessThanOrEq = 202
GreaterThan = 203
GreaterThanOrEq = 204
Eq = 205
NotEq = 206
StartsWith = 207
NotStartsWith = 208
In = 301
NotIn = 302
Implementations§
Source§impl PredicateOperator
impl PredicateOperator
Sourcepub fn is_unary(self) -> bool
pub fn is_unary(self) -> bool
Check if this operator is unary operator.
§Example
use iceberg::expr::PredicateOperator;
assert!(PredicateOperator::IsNull.is_unary());
Sourcepub fn is_binary(self) -> bool
pub fn is_binary(self) -> bool
Check if this operator is binary operator.
§Example
use iceberg::expr::PredicateOperator;
assert!(PredicateOperator::LessThan.is_binary());
Sourcepub fn is_set(self) -> bool
pub fn is_set(self) -> bool
Check if this operator is set operator.
§Example
use iceberg::expr::PredicateOperator;
assert!(PredicateOperator::In.is_set());
Sourcepub fn negate(self) -> PredicateOperator
pub fn negate(self) -> PredicateOperator
Returns the predicate that is the inverse of self
§Example
use iceberg::expr::PredicateOperator;
assert_eq!(
PredicateOperator::IsNull.negate(),
PredicateOperator::NotNull
);
assert_eq!(PredicateOperator::IsNan.negate(), PredicateOperator::NotNan);
assert_eq!(
PredicateOperator::LessThan.negate(),
PredicateOperator::GreaterThanOrEq
);
assert_eq!(
PredicateOperator::GreaterThan.negate(),
PredicateOperator::LessThanOrEq
);
assert_eq!(PredicateOperator::Eq.negate(), PredicateOperator::NotEq);
assert_eq!(PredicateOperator::In.negate(), PredicateOperator::NotIn);
assert_eq!(
PredicateOperator::StartsWith.negate(),
PredicateOperator::NotStartsWith
);
Trait Implementations§
Source§impl Clone for PredicateOperator
impl Clone for PredicateOperator
Source§fn clone(&self) -> PredicateOperator
fn clone(&self) -> PredicateOperator
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 PredicateOperator
impl Debug for PredicateOperator
Source§impl<'de> Deserialize<'de> for PredicateOperator
impl<'de> Deserialize<'de> for PredicateOperator
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 PredicateOperator
impl Display for PredicateOperator
Source§impl PartialEq for PredicateOperator
impl PartialEq for PredicateOperator
Source§impl Serialize for PredicateOperator
impl Serialize for PredicateOperator
impl Copy for PredicateOperator
impl StructuralPartialEq for PredicateOperator
Auto Trait Implementations§
impl Freeze for PredicateOperator
impl RefUnwindSafe for PredicateOperator
impl Send for PredicateOperator
impl Sync for PredicateOperator
impl Unpin for PredicateOperator
impl UnwindSafe for PredicateOperator
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> 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