spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] maropu commented on a change in pull request #25253: [SPARK-28470][SQL] Cast to decimal throws ArithemticException on overflow
Date Sat, 03 Aug 2019 12:37:55 GMT
maropu commented on a change in pull request #25253: [SPARK-28470][SQL] Cast to decimal throws
ArithemticException on overflow
URL: https://github.com/apache/spark/pull/25253#discussion_r310350023
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
 ##########
 @@ -959,15 +972,25 @@ case class Cast(child: Expression, dataType: DataType, timeZoneId:
Option[String
       evPrim: ExprValue, evNull: ExprValue, canNullSafeCast: Boolean): Block = {
     if (canNullSafeCast) {
       code"""
-         |$d.changePrecision(${decimalType.precision}, ${decimalType.scale});
+         |$d.changePrecision(
+         |  ${decimalType.precision}, ${decimalType.scale});
 
 Review comment:
   nit: write this in a single line? `         |$d.changePrecision(${decimalType.precision},
${decimalType.scale});`

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message