use of org.apache.drill.exec.vector.accessor.reader.AbstractObjectReader in project drill by apache.
the class HyperReaderBuilder method buildUnion.
private AbstractObjectReader buildUnion(VectorAccessor unionAccessor, ColumnMetadata metadata) {
VariantMetadata unionSchema = metadata.variantSchema();
final AbstractObjectReader[] variants = new AbstractObjectReader[MinorType.values().length];
for (ColumnMetadata member : unionSchema.members()) {
// The following builds a synthetic field since we have no good way to
// access the real field at this point.
variants[member.type().ordinal()] = buildVectorReader(new VectorAccessors.UnionMemberHyperVectorAccessor(unionAccessor, member.majorType()), member);
}
return UnionReaderImpl.build(metadata, unionAccessor, variants);
}
Aggregations