Expand description
Utility functions for expression simplification
Statics§
Functions§
- as_
bool_ lit - returns the contained boolean value in
exprasExpr::Literal(ScalarValue::Boolean(v)). - can_
reduce_ to_ equal_ statement - delete_
xor_ in_ complex_ expr - Deletes all ‘needles’ or remains one ‘needle’ that are found in a chain of xor expressions. Such as: A ^ (A ^ (B ^ A))
- distribute_
negation - bitwise negate a Negative clause input is the clause to be bitwise negated.(args for Negative clause) For BinaryExpr: ~(A & B) ===> ~A | ~B ~(A | B) ===> ~A & ~B For Negative: ~(~A) ===> A For others, use Negative clause
- expr_
contains - check volatile calls and return if expr contains needle
- expr_
contains_ 🔒inner - returns true if
needleis found in a chain of search_op expressions. Such as: (A AND B) AND C - into_
case - is_
bool_ lit - returns true if expr is a
Expr::Literal(ScalarValue::Boolean(v)), false otherwise - is_
case_ with_ literal_ outputs - is_
false - is_lit
- is_
negative_ of - returns true if
not_expris !expr(bitwise not) - is_
not_ of - returns true if
not_expris !expr(not) - is_null
- is_one
- is_
op_ with - returns true if
haystacklooks like (needle OP X) or (X OP needle) - is_true
- is_zero
- lit_
bool_ null - Return a literal NULL value of Boolean data type
- negate_
clause - negate a Not clause input is the clause to be negated.(args of Not clause) For BinaryExpr, use the negation of op instead. not ( A > B) ===> (A <= B) For BoolExpr, not (A and B) ===> (not A) or (not B) not (A or B) ===> (not A) and (not B) not (not A) ===> A For NullExpr, not (A is not null) ===> A is null not (A is null) ===> A is not null For InList, not (A not in (..)) ===> A in (..) not (A in (..)) ===> A not in (..) For Between, not (A between B and C) ===> (A not between B and C) not (A not between B and C) ===> (A between B and C) For others, use Not clause