Github user ueshin commented on a diff in the pull request:
https://github.com/apache/spark/pull/20450#discussion_r164986589
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/execution/vectorized/ColumnarBatchSuite.scala
---
@@ -761,6 +761,43 @@ class ColumnarBatchSuite extends SparkFunSuite {
}
}
+ test("Int Map") {
+ (MemoryMode.ON_HEAP :: MemoryMode.OFF_HEAP :: Nil).foreach { memMode =>
+ val column = allocate(10, new MapType(IntegerType, IntegerType,
false), memMode)
+ (0 to 1).foreach { colIndex =>
+ val data = column.getChild(colIndex)
+ (0 to 5).foreach {i =>
+ data.putInt(i, i * (colIndex + 1))
+ }
+ }
+
+ // Populate it with maps [0->0], [1->2, 2->4], [], [3->6, 4->8,
5->10]
+ column.putArray(0, 0, 1)
+ column.putArray(1, 1, 2)
+ column.putNull(2)
+ column.putArray(3, 2, 0)
--- End diff --
`column.putArray(3, 3, 0)`?
Seems like line 670 is the same mistake?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]