maropu commented on a change in pull request #31840:
URL: https://github.com/apache/spark/pull/31840#discussion_r594791555



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
##########
@@ -293,15 +293,6 @@ object QueryExecutionErrors {
     new IllegalStateException("table stats must be specified.")
   }
 
-  def unaryMinusCauseOverflowError(originValue: Short): ArithmeticException = {
-    new ArithmeticException(s"- $originValue caused overflow.")
-  }
-
-  def binaryArithmeticCauseOverflowError(
-      eval1: Short, symbol: String, eval2: Short): ArithmeticException = {
-    new ArithmeticException(s"$eval1 $symbol $eval2 caused overflow.")
-  }

Review comment:
       Why did you remove these methods from this file? How about merging these 
funcs into a unified one like this?
   ```
     def arithmeticCauseOverflowError(overflowCause: String): 
ArithmeticException = {
       new ArithmeticException(s"$overflowCause caused overflow.")
     }
   ```




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