use of org.apache.drill.exec.physical.rowSet.model.MetadataProvider.VectorDescrip 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.VectorDescrip in project drill by axbaretto.
the class BaseReaderBuilder method buildContainerChildren.
protected AbstractObjectReader[] buildContainerChildren(VectorContainer container, MetadataProvider mdProvider) {
List<AbstractObjectReader> readers = new ArrayList<>();
for (int i = 0; i < container.getNumberOfColumns(); i++) {
VectorWrapper<?> vw = container.getValueVector(i);
VectorDescrip descrip = new VectorDescrip(mdProvider, i, vw.getField());
readers.add(buildVectorReader(vw, descrip));
}
return readers.toArray(new AbstractObjectReader[readers.size()]);
}
use of org.apache.drill.exec.physical.rowSet.model.MetadataProvider.VectorDescrip 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.VectorDescrip in project drill by axbaretto.
the class BaseWriterBuilder method buildContainerChildren.
protected List<AbstractObjectWriter> buildContainerChildren(VectorContainer container, MetadataProvider mdProvider) {
List<AbstractObjectWriter> writers = new ArrayList<>();
for (int i = 0; i < container.getNumberOfColumns(); i++) {
@SuppressWarnings("resource") ValueVector vector = container.getValueVector(i).getValueVector();
VectorDescrip descrip = new VectorDescrip(mdProvider, i, vector.getField());
writers.add(buildVectorWriter(vector, descrip));
}
return writers;
}
use of org.apache.drill.exec.physical.rowSet.model.MetadataProvider.VectorDescrip in project drill by axbaretto.
the class BaseReaderBuilder method buildContainerChildren.
protected List<AbstractObjectReader> buildContainerChildren(VectorContainer container, MetadataProvider mdProvider) {
List<AbstractObjectReader> writers = new ArrayList<>();
for (int i = 0; i < container.getNumberOfColumns(); i++) {
@SuppressWarnings("resource") ValueVector vector = container.getValueVector(i).getValueVector();
VectorDescrip descrip = new VectorDescrip(mdProvider, i, vector.getField());
writers.add(buildVectorReader(vector, descrip));
}
return writers;
}
Aggregations