diffSchema.recordNewField(field);
}
private VectorHolder getOrCreateVectorHolder(Field field) throws SchemaChangeException {
String fullFieldName = ref != null ? ref.getPath() + "." + field.getFullFieldName() : field.getFullFieldName();
VectorHolder holder = valueVectorMap.get(fullFieldName);
if (holder == null) {
MajorType type = field.getFieldType();
MinorType minorType = type.getMinorType();
if (minorType.equals(MinorType.MAP) || minorType.equals(MinorType.LATE)) {
return null;
}
MaterializedField f = MaterializedField.create(new SchemaPath(fullFieldName, ExpressionPosition.UNKNOWN), type);
ValueVector v = TypeHelper.getNewVector(f, allocator);
AllocationHelper.allocate(v, batchSize, 50);
holder = new VectorHolder(v);
valueVectorMap.put(fullFieldName, holder);
outputMutator.addField(v);
return holder;
}
return holder;