dongjoon-hyun commented on code in PR #44498:
URL: https://github.com/apache/spark/pull/44498#discussion_r1436672235


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/UnwrapCastInBinaryComparison.scala:
##########
@@ -452,9 +452,7 @@ object UnwrapCastInBinaryComparison extends 
Rule[LogicalPlan] {
       fromExp: Expression,
       toType: DataType,
       literalType: DataType): Boolean = {
-    DataTypeUtils.sameType(toType, literalType) &&
-      !fromExp.foldable &&
-      toType.isInstanceOf[NumericType] &&
+    DataTypeUtils.sameType(toType, literalType) && !fromExp.foldable &&

Review Comment:
   Ya, I agree with @viirya 's comment. 
   
   We had better keep the original code because the method description 
explicitly says.
   > Note this only handles the case when both sides are of numeric type.



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