cloud-fan commented on code in PR #37439:
URL: https://github.com/apache/spark/pull/37439#discussion_r952326271


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/UnwrapCastInBinaryComparison.scala:
##########
@@ -155,7 +155,16 @@ object UnwrapCastInBinaryComparison extends 
Rule[LogicalPlan] {
       list.foreach {
         case lit @ Literal(null, _) => nullList += lit
         case lit @ NonNullLiteral(_, _) =>
-          unwrapCast(EqualTo(in.value, lit)) match {

Review Comment:
   I mean something like
   ```
   val newList = list.map(lit => unwrapCast(EqualTo(in.value, lit)))
   if (newList.forall(_.isDefined)) {
     ...
   } else {
     exp
   }
   ```



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