Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/20395#discussion_r164065557
--- 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 --
Shall we move the details of `ColumnarArray` implementation to
`ColumnarArray` class?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]