cloud-fan commented on a change in pull request #31840:
URL: https://github.com/apache/spark/pull/31840#discussion_r594885844



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
##########
@@ -61,7 +61,7 @@ case class UnaryMinus(
         s"""
            |$javaType $originValue = ($javaType)($eval);
            |if ($originValue == $javaBoxedType.MIN_VALUE) {
-           |  throw 
QueryExecutionErrors.unaryMinusCauseOverflowError($originValue);
+           |  throw new ArithmeticException("${dataType.simpleString} 
overflow");

Review comment:
       shall we put this error message in `QueryExecutionErrors` like 
`unaryMinusCauseOverflowError`?




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

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