You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/15 16:18:12 UTC
[GitHub] [spark] MaxGekk commented on a change in pull request #31840: [SPARK-34745][SQL] Unify overflow exception error message of integral types
MaxGekk commented on a change in pull request #31840:
URL: https://github.com/apache/spark/pull/31840#discussion_r594481549
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/types/numerics.scala
##########
@@ -26,7 +26,7 @@ import org.apache.spark.sql.types.Decimal.DecimalIsConflicted
private[sql] object ByteExactNumeric extends ByteIsIntegral with Ordering.ByteOrdering {
private def checkOverflow(res: Int, x: Byte, y: Byte, op: String): Unit = {
if (res > Byte.MaxValue || res < Byte.MinValue) {
- throw new ArithmeticException(s"$x $op $y caused overflow.")
Review comment:
As an end user, I would prefer to see which particular values caused the issue. Unification is nice but it shouldn't make user experience worse, IMHO.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org