gotocoding-DB commented on code in PR #48773:
URL: https://github.com/apache/spark/pull/48773#discussion_r1834695708


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/IntervalMathUtils.scala:
##########
@@ -31,16 +31,17 @@ object IntervalMathUtils {
 
   def subtractExact(a: Long, b: Long): Long = 
withOverflow(Math.subtractExact(a, b), "try_subtract")
 
-  def negateExact(a: Int): Int = withOverflow(Math.negateExact(a))
+  def negateExact(a: Int): Int = withOverflow(Math.negateExact(a), 
"try_multiply")

Review Comment:
   I think it's better to suggest `try_multiply` here instead of suggesting 
nothing. Hope user will find out that `-x` could be replaced by 
`try_multiply(x, -1)`.



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