Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/20395#discussion_r164066651
--- Diff:
sql/core/src/main/java/org/apache/spark/sql/vectorized/ArrowColumnVector.java
---
@@ -450,13 +437,12 @@ final boolean isNullAt(int rowId) {
}
@Override
- final int getArrayLength(int rowId) {
- return accessor.getInnerValueCountAt(rowId);
- }
-
- @Override
- final int getArrayOffset(int rowId) {
- return accessor.getOffsetBuffer().getInt(rowId *
accessor.OFFSET_WIDTH);
+ final ColumnarArray getArray(int rowId) {
+ ArrowBuf offsets = accessor.getOffsetBuffer();
+ int index = rowId * accessor.OFFSET_WIDTH;
+ int start = offsets.getInt(index);
+ int end = offsets.getInt(index + accessor.OFFSET_WIDTH);
--- End diff --
At the last rowId, what `offsets.getInt(index + accessor.OFFSET_WIDTH)`
returns?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]