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/06/22 14:06:03 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #33011: [SPARK-35841][SQL] Casting string to decimal type doesn't work if the…
cloud-fan commented on a change in pull request #33011:
URL: https://github.com/apache/spark/pull/33011#discussion_r656256370
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/types/Decimal.scala
##########
@@ -587,12 +587,8 @@ object Decimal {
}
}
- private def calculatePrecision(bigDecimal: JavaBigDecimal): Int = {
- if (bigDecimal.scale < 0) {
+ private def calculateWholeNumberPartLength(bigDecimal: JavaBigDecimal): Int = {
bigDecimal.precision - bigDecimal.scale
Review comment:
does it only count the number of digits before the dot?
--
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