beliefer opened a new pull request, #37317:
URL: https://github.com/apache/spark/pull/37317

   ### What changes were proposed in this pull request?
   If boolean expression have two similar binary comparisons have the same 
symbol(e.g., >) and one side is literal and connected with `And`.
   For example, `'a > 1 and 'a > 2`.
   In fact, we can combine them as `'a > 2`.
   
   The idea is compare literal value and combine them. Take the above example, 
because 1 < 2, so combine `'a > 1 and 'a > 2` as `'a > 2`.
   
   This PR also considers swap binary comparison if the literal on the left of 
`And`.
   For example, `1 < 'a and 2 < 'a` will be combined as  `'a > 2` too.
   
   
   ### Why are the changes needed?
   Simplify the binary comparisons in boolean expression.
   
   
   ### Does this PR introduce _any_ user-facing change?
   'No'.
   Just change the inner rule.
   
   
   ### How was this patch tested?
   New test cases.
   


-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to