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

    https://github.com/apache/spark/pull/20395#discussion_r164067505
  
    --- Diff: 
sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/WritableColumnVector.java
 ---
    @@ -602,7 +603,17 @@ public final int appendStruct(boolean isNull) {
       // `WritableColumnVector` puts the data of array in the first child 
column vector, and puts the
       // array offsets and lengths in the current column vector.
       @Override
    -  public WritableColumnVector arrayData() { return childColumns[0]; }
    +  public final ColumnarArray getArray(int rowId) {
    +    return new ColumnarArray(arrayData(), getArrayOffset(rowId), 
getArrayLength(rowId));
    +  }
    +
    +  public WritableColumnVector arrayData() {
    +    return childColumns[0];
    +  }
    +
    +  public abstract int getArrayLength(int rowId);
    +
    +  public abstract int getArrayOffset(int rowId);
    --- End diff --
    
    Shall we make these two methods private/protected?


---

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

Reply via email to