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

    https://github.com/apache/spark/pull/18405#discussion_r126464759
  
    --- Diff: 
sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/ColumnVector.java
 ---
    @@ -1049,22 +1062,29 @@ public ColumnVector getDictionaryIds() {
        * Sets up the common state and also handles creating the child columns 
if this is a nested
        * type.
        */
    -  protected ColumnVector(int capacity, DataType type, MemoryMode memMode) {
    +  protected ColumnVector(int capacity, DataType type, MemoryMode memMode, 
boolean containsNull) {
         this.capacity = capacity;
         this.type = type;
    +    this.containsNull = containsNull;
     
         if (type instanceof ArrayType || type instanceof BinaryType || type 
instanceof StringType
             || DecimalType.isByteArrayDecimalType(type)) {
           DataType childType;
           int childCapacity = capacity;
    +      this.childColumns = new ColumnVector[1];
           if (type instanceof ArrayType) {
             childType = ((ArrayType)type).elementType();
    +        this.childColumns[0] = ColumnVector.allocate(childCapacity, 
childType, memMode,
    +          ((ArrayType) type).containsNull());
    +      } else if (type instanceof BinaryType || type instanceof StringType) 
{
    +        childType = DataTypes.ByteType;
    +        childCapacity *= DEFAULT_ARRAY_LENGTH;
    +        this.childColumns[0] = ColumnVector.allocate(childCapacity, 
childType, memMode, false);
    --- End diff --
    
    nit: containsNull = false ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to