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 2021/11/01 01:17:59 UTC

[GitHub] [spark] Peng-Lei commented on a change in pull request #34446: [SPARK-37161][SQL] RowToColumnConverter support AnsiIntervalType

Peng-Lei commented on a change in pull request #34446:
URL: https://github.com/apache/spark/pull/34446#discussion_r739907618



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/vectorized/ColumnarBatchSuite.scala
##########
@@ -1688,6 +1688,45 @@ class ColumnarBatchSuite extends SparkFunSuite {
     }
   }
 
+  test("SPARK-37161: RowToColumnConverter for AnsiIntervalType") {
+    DataTypeTestUtils.yearMonthIntervalTypes.foreach { dt =>
+      val schema = new StructType().add(dt.typeName, dt)
+      val converter = new RowToColumnConverter(schema)
+      val columns = OnHeapColumnVector.allocateColumns(10, schema)
+      val batch = new ColumnarBatch(columns.toArray, 3)

Review comment:
       Sorry, a mistake. It should be `val batch = new ColumnarBatch(columns.toArray, **10**)`, It's meant to free up resources(`batch.close()`) instead of `columns.foreach(_.close())`




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