We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fcd665e commit 610a595Copy full SHA for 610a595
1 file changed
sql/catalyst/src/main/scala/org/apache/spark/sql/types/Decimal.scala
@@ -250,12 +250,11 @@ final class Decimal extends Ordered[Decimal] with Serializable with Logging {
250
if (copy.changePrecision(precision, scale, roundMode)) {
251
copy
252
} else {
253
- def message = s"$toDebugString cannot be represented as Decimal($precision, $scale)."
254
if (nullOnOverflow) {
255
- if (log.isDebugEnabled) logDebug(s"$message NULL is returned.")
256
null
257
258
- throw new ArithmeticException(message)
+ throw new ArithmeticException(
+ s"$toDebugString cannot be represented as Decimal($precision, $scale).")
259
}
260
261
0 commit comments