izveigor commented on code in PR #5516:
URL: https://github.com/apache/arrow-datafusion/pull/5516#discussion_r1129968496


##########
datafusion/optimizer/src/simplify_expressions/utils.rs:
##########
@@ -311,6 +311,38 @@ pub fn negate_clause(expr: Expr) -> Expr {
     }
 }
 
+/// 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
+///    ~(~A) ===> A
+/// For others, use Negative clause
+pub fn negative_clause(expr: Expr) -> Expr {

Review Comment:
   I think, it deserves a better name.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to