use of org.apache.drill.exec.physical.rowSet.model.MetadataProvider in project drill by axbaretto.
the class BaseReaderBuilder method buildMap.
private List<AbstractObjectReader> buildMap(HyperVectorWrapper<? extends AbstractMapVector> vectors, VectorDescrip descrip) {
List<AbstractObjectReader> readers = new ArrayList<>();
MetadataProvider provider = descrip.parent.childProvider(descrip.metadata);
MaterializedField mapField = vectors.getField();
for (int i = 0; i < mapField.getChildren().size(); i++) {
HyperVectorWrapper<? extends ValueVector> child = (HyperVectorWrapper<? extends ValueVector>) vectors.getChildWrapper(new int[] { i });
VectorDescrip childDescrip = new VectorDescrip(provider, i, child.getField());
readers.add(buildVectorReader(child, childDescrip));
i++;
}
return readers;
}
use of org.apache.drill.exec.physical.rowSet.model.MetadataProvider in project drill by axbaretto.
the class BaseReaderBuilder method buildMap.
private List<AbstractObjectReader> buildMap(AbstractMapVector vector, VectorDescrip descrip) {
List<AbstractObjectReader> readers = new ArrayList<>();
MetadataProvider provider = descrip.parent.childProvider(descrip.metadata);
int i = 0;
for (ValueVector child : vector) {
VectorDescrip childDescrip = new VectorDescrip(provider, i, child.getField());
readers.add(buildVectorReader(child, childDescrip));
i++;
}
return readers;
}
use of org.apache.drill.exec.physical.rowSet.model.MetadataProvider in project drill by axbaretto.
the class VectorAllocator method allocateMap.
private void allocateMap(AbstractMapVector vector, ColumnMetadata metadata, int valueCount, MetadataProvider mdProvider) {
MetadataProvider mapProvider = mdProvider.childProvider(metadata);
TupleMetadata mapSchema = metadata.mapSchema();
assert mapSchema != null;
int i = 0;
for (ValueVector child : vector) {
allocateVector(child, mapProvider.metadata(i, child.getField()), valueCount, mapProvider);
i++;
}
}
use of org.apache.drill.exec.physical.rowSet.model.MetadataProvider in project drill by axbaretto.
the class BaseWriterBuilder method buildMap.
private List<AbstractObjectWriter> buildMap(AbstractMapVector vector, VectorDescrip descrip) {
List<AbstractObjectWriter> writers = new ArrayList<>();
MetadataProvider provider = descrip.parent.childProvider(descrip.metadata);
int i = 0;
for (ValueVector child : vector) {
VectorDescrip childDescrip = new VectorDescrip(provider, i, child.getField());
writers.add(buildVectorWriter(child, childDescrip));
i++;
}
return writers;
}
Aggregations