use of org.apache.drill.exec.vector.accessor.impl.AbstractColumnWriter in project drill by apache.
the class DirectRowSet method buildWriter.
/**
* Build writer objects for each column based on the column type.
*
* @param rowIndex the index which points to each row
* @return an array of writers
*/
protected RowSetWriter buildWriter(ExtendableRowIndex rowIndex) {
ValueVector[] valueVectors = vectors();
AbstractColumnWriter[] writers = new AbstractColumnWriter[valueVectors.length];
for (int i = 0; i < writers.length; i++) {
writers[i] = ColumnAccessorFactory.newWriter(valueVectors[i].getField().getType());
writers[i].bind(rowIndex, valueVectors[i]);
}
TupleSchema accessSchema = schema().hierarchicalAccess();
return new RowSetWriterImpl(this, accessSchema, rowIndex, writers);
}
Aggregations