Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20395#discussion_r164086846
  
    --- Diff: 
sql/core/src/main/java/org/apache/spark/sql/vectorized/ColumnVector.java ---
    @@ -182,57 +187,54 @@
       }
     
       /**
    -   * Returns the length of the array for rowId.
    -   */
    -  public abstract int getArrayLength(int rowId);
    -
    -  /**
    -   * Returns the offset of the array for rowId.
    -   */
    -  public abstract int getArrayOffset(int rowId);
    -
    -  /**
    -   * Returns the struct for rowId.
    +   * Returns the struct type value for rowId.
    +   *
    +   * To support struct type, implementations must implement {@link 
#getChild(int)} and make this
    +   * vector a tree structure. The number of child vectors must be same as 
the number of fields of
    +   * the struct type, and each child vector is responsible to store the 
data for its corresponding
    +   * struct field.
        */
       public final ColumnarRow getStruct(int rowId) {
         return new ColumnarRow(this, rowId);
       }
     
       /**
    -   * Returns the array for rowId.
    +   * Returns the array type value for rowId.
    +   *
    +   * To support array type, implementations must construct an {@link 
ColumnarArray} and return it in
    +   * this method. {@link ColumnarArray} requires a {@link ColumnVector} 
that stores the data of all
    --- End diff --
    
    The comments here are mostly about how to construct the `ColumnarArray`, 
but about `ColumnarArray` itself, so I'd like to keep them here.


---

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

Reply via email to