Skip to content

Commit 9f4002c

Browse files
committed
revise comment
1 parent 86d3e8d commit 9f4002c

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ final class Decimal extends Ordered[Decimal] with Serializable {
317317
} else {
318318
try {
319319
// We cannot store Long.MAX_VALUE as a Double without losing precision.
320-
// Simply converting the decimal to `BigInteger` and using the method `longValueExact` can
321-
// guarantee the precision of the range check.
320+
// Here we simply convert the decimal to `BigInteger` and use the method
321+
// `longValueExact` to make sure the range check is accurate.
322322
decimalVal.bigDecimal.toBigInteger.longValueExact()
323323
} catch {
324324
case _: ArithmeticException => overflowException("long")

0 commit comments

Comments
 (0)