wankunde commented on code in PR #41782:
URL: https://github.com/apache/spark/pull/41782#discussion_r1299381216


##########
sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/WritableColumnVector.java:
##########
@@ -867,12 +880,28 @@ public final boolean isAllNull() {
    */
   protected int capacity;
 
+  /**
+   * The default number of rows that can be stored in this column.
+   */
+  protected int defaultCapacity;
+
   /**
    * Upper limit for the maximum capacity for this column.
    */
   @VisibleForTesting
   protected int MAX_CAPACITY = ByteArrayMethods.MAX_ROUNDED_ARRAY_LENGTH;
 
+  /**
+   * True if this column has default values. Return the default values instead 
of NULL when the
+   * corresponding columns are not present in storage. We can not reset the 
data of column vectors
+   * that has default values.

Review Comment:
   I'm sorry, it seems to be another issue.
   
   If a column vector has default values, we will always set isConstant to 
true. So we don't need the hasDefaultValue field. But we should also set the 
isConstant to true for all its children vectors.
   Change code : 
https://github.com/apache/spark/pull/41782/commits/128c8ff1b546d1a9408c6095ba0e60a164b43cef



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to