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/09 02:37:12 UTC

[GitHub] [spark] maropu commented on a change in pull request #26699: [SPARK-30066][SQL] Columnar execution support for interval types

maropu commented on a change in pull request #26699: [SPARK-30066][SQL] Columnar execution support for interval types
URL: https://github.com/apache/spark/pull/26699#discussion_r355241947
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/GenerateColumnAccessor.scala
 ##########
 @@ -109,6 +115,14 @@ object GenerateColumnAccessor extends CodeGenerator[Seq[DataType], ColumnarItera
               rowWriter.write($index, (Decimal) null, $p, $s);
             }
            """
+        case CalendarIntervalType =>
+          // For CalendarInterval, it should have 16 bytes to store months(Int), days(Int),
+          // microseconds(Long) for future update even it's null now.
+          s"""
+            if (mutableRow.isNullAt($index)) {
+              rowWriter.write($index, (CalendarInterval) null);
+            }
+           """
 
 Review comment:
   Is this patch work related to this discussion? https://github.com/apache/spark/pull/26680#discussion_r351153420
   If we can remove this patch, the gen'd code looks nicer to me. cc: @cloud-fan 

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