pan3793 commented on code in PR #54553:
URL: https://github.com/apache/spark/pull/54553#discussion_r2867667225
##########
sql/api/src/main/scala/org/apache/spark/sql/catalyst/util/MathUtils.scala:
##########
@@ -94,7 +94,9 @@ object MathUtils {
f
} catch {
case e: ArithmeticException =>
- throw ExecutionErrors.arithmeticOverflowError(e.getMessage, hint,
context)
+ // On JDK 25+, Math.*Exact may throw ArithmeticException without a
message
+ val message = if (e.getMessage != null) e.getMessage else "Overflow"
+ throw ExecutionErrors.arithmeticOverflowError(message, hint, context)
Review Comment:
changing here causes duplication, why not do it in
`ExecutionErrors.arithmeticOverflowError` like
https://github.com/apache/spark/pull/54514?
in addition, better to use lower case "overflow" to match the original JDK
message style
--
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]