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

   ### What changes were proposed in this pull request?
   
   This PR makes `UnwrapCastInBinaryComparison` not to unwrap casts in binary 
comparison when literal is null.
   
   ### Why are the changes needed?
   
   In order to make the logic of `UnwrapCastInBinaryComparison` more clear. 
Null literals are already handled by `NullPropagation`:
   
https://github.com/apache/spark/blob/2de0d45887509fac8d5fc9448764a0e71f618797/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala#L823-L824
   
   
https://github.com/apache/spark/blob/2de0d45887509fac8d5fc9448764a0e71f618797/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala#L850-L851
   
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Existing unit tests.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to