yaooqinn 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_r351177598
 
 

 ##########
 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, 0);
 
 Review comment:
   yea

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to