bersprockets commented on code in PR #38923:
URL: https://github.com/apache/spark/pull/38923#discussion_r1040179271


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/InterpretedMutableProjection.scala:
##########
@@ -75,13 +78,28 @@ class InterpretedMutableProjection(expressions: 
Seq[Expression]) extends Mutable
     if (!e.nullable) {
       (v: Any) => writer(mutableRow, v)
     } else {
-      (v: Any) => {
-        if (v == null) {
-          mutableRow.setNullAt(i)
-        } else {
-          writer(mutableRow, v)
-        }
+      val nullSafeWriter: (InternalRow, Any) => Unit = e.dataType match {
+        case DecimalType.Fixed(precision, _) if precision > 
Decimal.MAX_LONG_DIGITS =>

Review Comment:
   This won't handle the case where the decimal type is nested in a struct or 
array. But in that case, the target row won't be an unsafe row (since 
`InterpretedMutableProjection#target` would reject such a row, AFAICT), so the 
plain `writer` will be fine.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to