sunchao commented on code in PR #36427: URL: https://github.com/apache/spark/pull/36427#discussion_r868880982
########## sql/catalyst/src/main/java/org/apache/spark/sql/vectorized/ColumnVector.java: ########## @@ -310,6 +311,10 @@ public final CalendarInterval getInterval(int rowId) { * Sets up the data type of this column vector. */ protected ColumnVector(DataType type) { - this.type = type; + if (type instanceof UserDefinedType) { Review Comment: I wonder if it's better to move this to `reserveInternal`, since the `type` here is exposed via the `ColumnVector.dataType` method and maybe there're situations where a caller will expect the type here is the original type that passed into the constructor? For instance, this method is called in `ArrowEvalPythonExec` where the type is compared to the output type of the physical node. ########## sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/WritableColumnVector.java: ########## @@ -816,8 +816,8 @@ protected boolean isArray() { * Sets up the common state and also handles creating the child columns if this is a nested * type. */ - protected WritableColumnVector(int capacity, DataType type) { - super(type); + protected WritableColumnVector(int capacity, DataType dataType) { Review Comment: This is unrelated change but I'm fine since it makes the naming more consistent. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org