Search in sources :

Example 1 with UnionListReader

use of org.apache.drill.exec.vector.complex.impl.UnionListReader in project drill by apache.

the class ListVector method promoteToUnion.

public UnionVector promoteToUnion() {
    MaterializedField newField = MaterializedField.create(getField().getPath(), Types.optional(MinorType.UNION));
    UnionVector vector = new UnionVector(newField, allocator, null);
    replaceDataVector(vector);
    reader = new UnionListReader(this);
    return vector;
}
Also used : UnionListReader(org.apache.drill.exec.vector.complex.impl.UnionListReader) MaterializedField(org.apache.drill.exec.record.MaterializedField)

Example 2 with UnionListReader

use of org.apache.drill.exec.vector.complex.impl.UnionListReader in project drill by apache.

the class ListVector method addOrGetVector.

public <T extends ValueVector> AddOrGetResult<T> addOrGetVector(VectorDescriptor descriptor) {
    AddOrGetResult<T> result = super.addOrGetVector(descriptor);
    reader = new UnionListReader(this);
    return result;
}
Also used : UnionListReader(org.apache.drill.exec.vector.complex.impl.UnionListReader)

Aggregations

UnionListReader (org.apache.drill.exec.vector.complex.impl.UnionListReader)2 MaterializedField (org.apache.drill.exec.record.MaterializedField)1