Search in sources :

Example 6 with VectorDescrip

use of org.apache.drill.exec.physical.rowSet.model.MetadataProvider.VectorDescrip 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;
}
Also used : ValueVector(org.apache.drill.exec.vector.ValueVector) MetadataProvider(org.apache.drill.exec.physical.rowSet.model.MetadataProvider) ArrayList(java.util.ArrayList) VectorDescrip(org.apache.drill.exec.physical.rowSet.model.MetadataProvider.VectorDescrip) AbstractObjectWriter(org.apache.drill.exec.vector.accessor.writer.AbstractObjectWriter)

Aggregations

ArrayList (java.util.ArrayList)6 VectorDescrip (org.apache.drill.exec.physical.rowSet.model.MetadataProvider.VectorDescrip)6 ValueVector (org.apache.drill.exec.vector.ValueVector)5 AbstractObjectReader (org.apache.drill.exec.vector.accessor.reader.AbstractObjectReader)4 MetadataProvider (org.apache.drill.exec.physical.rowSet.model.MetadataProvider)3 AbstractObjectWriter (org.apache.drill.exec.vector.accessor.writer.AbstractObjectWriter)2 HyperVectorWrapper (org.apache.drill.exec.record.HyperVectorWrapper)1 MaterializedField (org.apache.drill.exec.record.MaterializedField)1