peter-toth commented on code in PR #38379:
URL: https://github.com/apache/spark/pull/38379#discussion_r1004215562


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala:
##########
@@ -477,7 +477,10 @@ case class Add(
   override protected def withNewChildrenInternal(newLeft: Expression, 
newRight: Expression): Add =
     copy(left = newLeft, right = newRight)
 
-  override lazy val canonicalized: Expression = {
+  override lazy val canonicalized: Expression = dataType match {
+    case _: DecimalType =>

Review Comment:
   Hmm, maybe adding an extra `Cast` is not a good idea as the 2 expressions 
with different `dataType`s shouldn't be considered equal.



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