Skip to content

Commit ab6d8af

Browse files
committed
Fix setOrNull.
1 parent 4aed66f commit ab6d8af

File tree

1 file changed

+1
-1
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/types

1 file changed

+1
-1
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/types/Decimal.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ final class Decimal extends Ordered[Decimal] with Serializable {
8686
if (precision < 19) {
8787
return null // Requested precision is too low to represent this value
8888
}
89-
this.decimalVal = BigDecimal(longVal)
89+
this.decimalVal = BigDecimal(unscaled)
9090
this.longVal = 0L
9191
} else {
9292
val p = POW_10(math.min(precision, MAX_LONG_DIGITS))

0 commit comments

Comments
 (0)