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 2019/12/02 06:02:46 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #26680:
[SPARK-30047][SQL] Support interval types in UnsafeRow
cloud-fan commented on a change in pull request #26680: [SPARK-30047][SQL] Support interval types in UnsafeRow
URL: https://github.com/apache/spark/pull/26680#discussion_r352431096
##########
File path: sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/codegen/UnsafeWriter.java
##########
@@ -134,13 +135,17 @@ public final void write(int ordinal, CalendarInterval input) {
// grow the global buffer before writing data.
grow(16);
- // Write the months, days and microseconds fields of Interval to the variable length portion.
- Platform.putInt(getBuffer(), cursor(), input.months);
- Platform.putInt(getBuffer(), cursor() + 4, input.days);
- Platform.putLong(getBuffer(), cursor() + 8, input.microseconds);
-
- setOffsetAndSize(ordinal, 16);
+ if (input == null) {
+ BitSetMethods.set(getBuffer(), startingOffset, ordinal);
+ setOffsetAndSize(ordinal, 16);
Review comment:
This can be put after the `if-else`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org