AssHero opened a new pull request, #2958:
URL: https://github.com/apache/arrow-datafusion/pull/2958

   # Which issue does this PR close?
   
   Closes #2957 
   
    # Rationale for this change
   negate a Not clause
   
   For BinaryExpr, use the negator 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
   
   # What changes are included in this PR?
   Add rules to simplify not clause in 
datafusion/optimizer/src/simplify_expressions.rs
   
   


-- 
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