Skip to content

Commit b9af4f5

Browse files
committed
update
1 parent f21f1a0 commit b9af4f5

File tree

1 file changed

+1
-1
lines changed
  • sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions

1 file changed

+1
-1
lines changed

sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ public void setDecimal(int ordinal, Decimal value, int precision) {
288288
Platform.putLong(baseObject, baseOffset + cursor, 0L);
289289
Platform.putLong(baseObject, baseOffset + cursor + 8, 0L);
290290

291-
if (value == null) {
291+
if (value == null || !value.changePrecision(precision, value.scale())) {
292292
setNullAt(ordinal);
293293
// keep the offset for future update
294294
Platform.putLong(baseObject, getFieldOffset(ordinal), cursor << 32);

0 commit comments

Comments
 (0)