-
- Downloads
[SPARK-8800] [SQL] Fix inaccurate precision/scale of Decimal division operation
JIRA: https://issues.apache.org/jira/browse/SPARK-8800 Previously, we turn to Java BigDecimal's divide with specified ROUNDING_MODE to avoid non-terminating decimal expansion problem. However, as JihongMA reported, for the division operation on some specific values, we get inaccurate results. Author: Liang-Chi Hsieh <viirya@gmail.com> Closes #7212 from viirya/fix_decimal4 and squashes the following commits: 4205a0a [Liang-Chi Hsieh] Fix inaccuracy precision/scale of Decimal division operation.
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/types/Decimal.scala 11 additions, 3 deletions...t/src/main/scala/org/apache/spark/sql/types/Decimal.scala
- sql/catalyst/src/test/scala/org/apache/spark/sql/types/decimal/DecimalSuite.scala 9 additions, 1 deletion...ala/org/apache/spark/sql/types/decimal/DecimalSuite.scala
Please register or sign in to comment