alamb commented on issue #1160:
URL: 
https://github.com/apache/arrow-datafusion/issues/1160#issuecomment-952905624


   @rdettai  I think it is still relevant (though the `now()` example will work 
after #1175)
   
   One (silly) example
   ```
   (expr != NULL) OR (5 > 10)
   ```
   
   We need to apply at least one pass twice to fully simplify
   
   ```
   (expr != NULL) OR (5 > 10)
   (expr != NULL) OR FALSE # after constant evaluation
   NULL OR FALSE           # after simplify
   NULL                    # after second constant evaluation
   ```
   
   In this this case if we applied simplify first and then constant evaluation 
the expression would be folded completely
   
   However, for other examples if you apply simplification first that is 
insufficient
   ```
   expr != (5 > NULL)
   expr != (5 > NULL) # after simplification
   expr != NULL       # after constant evaluation
   ```
   
   (would need a second call to simplify now)
   
   


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