Enum datafusion_expr::Operator
source · pub enum Operator {
Show 31 variants
Eq,
NotEq,
Lt,
LtEq,
Gt,
GtEq,
Plus,
Minus,
Multiply,
Divide,
Modulo,
And,
Or,
IsDistinctFrom,
IsNotDistinctFrom,
RegexMatch,
RegexIMatch,
RegexNotMatch,
RegexNotIMatch,
LikeMatch,
ILikeMatch,
NotLikeMatch,
NotILikeMatch,
BitwiseAnd,
BitwiseOr,
BitwiseXor,
BitwiseShiftRight,
BitwiseShiftLeft,
StringConcat,
AtArrow,
ArrowAt,
}
Expand description
Operators applied to expressions
Variants§
Eq
Expressions are equal
NotEq
Expressions are not equal
Lt
Left side is smaller than right side
LtEq
Left side is smaller or equal to right side
Gt
Left side is greater than right side
GtEq
Left side is greater or equal to right side
Plus
Addition
Minus
Subtraction
Multiply
Multiplication operator, like *
Divide
Division operator, like /
Modulo
Remainder operator, like %
And
Logical AND, like &&
Or
Logical OR, like ||
IsDistinctFrom
IS DISTINCT FROM
(see distinct
)
IsNotDistinctFrom
IS NOT DISTINCT FROM
(see not_distinct
)
RegexMatch
Case sensitive regex match
RegexIMatch
Case insensitive regex match
RegexNotMatch
Case sensitive regex not match
RegexNotIMatch
Case insensitive regex not match
LikeMatch
Case sensitive pattern match
ILikeMatch
Case insensitive pattern match
NotLikeMatch
Case sensitive pattern not match
NotILikeMatch
Case insensitive pattern not match
BitwiseAnd
Bitwise and, like &
BitwiseOr
Bitwise or, like |
BitwiseXor
Bitwise xor, such as ^
in MySQL or #
in PostgreSQL
BitwiseShiftRight
Bitwise right, like >>
BitwiseShiftLeft
Bitwise left, like <<
StringConcat
String concat
AtArrow
At arrow, like @>
ArrowAt
Arrow at, like <@
Implementations§
source§impl Operator
impl Operator
sourcepub fn negate(&self) -> Option<Operator>
pub fn negate(&self) -> Option<Operator>
If the operator can be negated, return the negated operator otherwise return None
sourcepub fn is_numerical_operators(&self) -> bool
pub fn is_numerical_operators(&self) -> bool
Return true if the operator is a numerical operator.
For example, ‘Binary(a, +, b)’ would be a numerical expression. PostgresSQL concept: https://www.postgresql.org/docs/7.0/operators2198.htm
sourcepub fn is_comparison_operator(&self) -> bool
pub fn is_comparison_operator(&self) -> bool
Return true if the operator is a comparison operator.
For example, ‘Binary(a, >, b)’ would be a comparison expression.
sourcepub fn is_logic_operator(&self) -> bool
pub fn is_logic_operator(&self) -> bool
Return true if the operator is a logic operator.
For example, ‘Binary(Binary(a, >, b), AND, Binary(a, <, b + 3))’ would be a logical expression.
sourcepub fn swap(&self) -> Option<Operator>
pub fn swap(&self) -> Option<Operator>
Return the operator where swapping lhs and rhs wouldn’t change the result.
For example Binary(50, >=, a)
could also be represented as Binary(a, <=, 50)
.
sourcepub fn precedence(&self) -> u8
pub fn precedence(&self) -> u8
Get the operator precedence use https://www.postgresql.org/docs/7.2/sql-precedence.html as a reference
Trait Implementations§
source§impl PartialOrd for Operator
impl PartialOrd for Operator
impl Copy for Operator
impl Eq for Operator
impl StructuralPartialEq for Operator
Auto Trait Implementations§
impl Freeze for Operator
impl RefUnwindSafe for Operator
impl Send for Operator
impl Sync for Operator
impl Unpin for Operator
impl UnwindSafe for Operator
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.