.append(")"); if (type.getSubTypeCount() > 0) { builder .append(", subtypes=(")
@Override public void setChildVector(ValueVector childVector) { // Unlike the repeated list vector, the (plain) list vector // adds the dummy vector as a child type. assert field.getChildren().size() == 1; assert field.getChildren().iterator().next().getType().getMinorType() == MinorType.LATE; field.removeChild(vector.getField()); super.setChildVector(childVector); // Initial LATE type vector not added as a subtype initially. // So, no need to remove it, just add the new subtype. Since the // MajorType is immutable, must build a new one and replace the type // in the materialized field. (We replace the type, rather than creating // a new materialized field, to preserve the link to this field from // a parent map, list or union.) assert field.getType().getSubTypeCount() == 0; field.replaceType( field.getType().toBuilder() .addSubType(childVector.getField().getType().getMinorType()) .build()); }
.append(")"); if (type.getSubTypeCount() > 0) { builder .append(", subtypes=(")
@Override public void setChildVector(ValueVector childVector) { // Unlike the repeated list vector, the (plain) list vector // adds the dummy vector as a child type. assert field.getChildren().size() == 1; assert field.getChildren().iterator().next().getType().getMinorType() == MinorType.LATE; field.removeChild(vector.getField()); super.setChildVector(childVector); // Initial LATE type vector not added as a subtype initially. // So, no need to remove it, just add the new subtype. Since the // MajorType is immutable, must build a new one and replace the type // in the materialized field. (We replace the type, rather than creating // a new materialized field, to preserve the link to this field from // a parent map, list or union.) assert field.getType().getSubTypeCount() == 0; field.replaceType( field.getType().toBuilder() .addSubType(childVector.getField().getType().getMinorType()) .build()); }