You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/12/19 06:18:41 UTC
[GitHub] [spark] cloud-fan commented on a diff in pull request #39117: [SPARK-41535][SQL] Set null correctly for calendar interval fields in `InterpretedUnsafeProjection` and `InterpretedMutableProjection`
cloud-fan commented on code in PR #39117:
URL: https://github.com/apache/spark/pull/39117#discussion_r1051845722
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/UnsafeRowUtils.scala:
##########
@@ -113,4 +113,29 @@ object UnsafeRowUtils {
val size = offsetAndSize.toInt
(offset, size)
}
+
+ /**
+ * Returns a Boolean indicating whether one should avoid calling
+ * UnsafeRow.setNullAt for a field of the given data type.
+ * Fields of type DecimalType (with precision
+ * greater than Decimal.MAX_LONG_DIGITS) and CalendarIntervalType use
+ * pointers into the variable length region, and those pointers should
+ * never get zeroed out (setNullAt will zero out those pointers).
+ *
+ * When avoidSetNullAt returns false, callers should not use
Review Comment:
```suggestion
* When avoidSetNullAt returns true, callers should not use
```
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org