-
- Downloads
[SPARK-21046][SQL] simplify the array offset and length in ColumnVector
## What changes were proposed in this pull request? Currently when a `ColumnVector` stores array type elements, we will use 2 arrays for lengths and offsets and implement them individually in on-heap and off-heap column vector. In this PR, we use one array to represent both offsets and lengths, so that we can treat it as `ColumnVector` and all the logic can go to the base class `ColumnVector` ## How was this patch tested? existing tests. Author: Wenchen Fan <wenchen@databricks.com> Closes #18260 from cloud-fan/put.
Showing
- sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/ColumnVector.java 18 additions, 17 deletions...g/apache/spark/sql/execution/vectorized/ColumnVector.java
- sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/OffHeapColumnVector.java 4 additions, 43 deletions...e/spark/sql/execution/vectorized/OffHeapColumnVector.java
- sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/OnHeapColumnVector.java 7 additions, 42 deletions...he/spark/sql/execution/vectorized/OnHeapColumnVector.java
- sql/core/src/test/scala/org/apache/spark/sql/execution/vectorized/ColumnarBatchSuite.scala 9 additions, 8 deletions...e/spark/sql/execution/vectorized/ColumnarBatchSuite.scala
Please register or sign in to comment