pnikic-db commented on code in PR #55828:
URL: https://github.com/apache/spark/pull/55828#discussion_r3241461189


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/decimalExpressions.scala:
##########
@@ -247,6 +247,34 @@ case class DecimalAddNoOverflowCheck(
     copy(left = newLeft, right = newRight)
 }
 
+/**
+ * A subtract expression for decimal values which is only used internally.
+ *
+ * Note that, this expression does not check overflow which is different from 
`Subtract`.
+ */

Review Comment:
   I've added the explanation you've proposed to the Scaladoc, which clearly 
explains why skipping the overflow check is safe for `counter_diff`. Thanks!



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