Github user ueshin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20450#discussion_r164995018
  
    --- 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 --
    
    Yes, so the offset of the next array should be `3`?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to