Search in sources :

Example 6 with SelectionVectorMode

use of org.apache.drill.exec.record.BatchSchema.SelectionVectorMode in project drill by apache.

the class RecordBatchData method canonicalize.

public void canonicalize() {
    SelectionVectorMode mode = container.getSchema().getSelectionVectorMode();
    container = VectorContainer.canonicalize(container);
    container.buildSchema(mode);
}
Also used : SelectionVectorMode(org.apache.drill.exec.record.BatchSchema.SelectionVectorMode)

Example 7 with SelectionVectorMode

use of org.apache.drill.exec.record.BatchSchema.SelectionVectorMode in project drill by apache.

the class RowSetPrinter method print.

public void print(PrintStream out) {
    SelectionVectorMode selectionMode = rowSet.indirectionType();
    RowSetReader reader = rowSet.reader();
    int colCount = reader.schema().count();
    printSchema(out, selectionMode);
    while (reader.next()) {
        printHeader(out, reader, selectionMode);
        for (int i = 0; i < colCount; i++) {
            if (i > 0) {
                out.print(", ");
            }
            out.print(reader.getAsString(i));
        }
        out.println();
    }
}
Also used : RowSetReader(org.apache.drill.test.rowSet.RowSet.RowSetReader) SelectionVectorMode(org.apache.drill.exec.record.BatchSchema.SelectionVectorMode)

Aggregations

SelectionVectorMode (org.apache.drill.exec.record.BatchSchema.SelectionVectorMode)7 MinorFragmentEndpoint (org.apache.drill.exec.physical.MinorFragmentEndpoint)2 DrillBuf (io.netty.buffer.DrillBuf)1 RelNode (org.apache.calcite.rel.RelNode)1 Prel (org.apache.drill.exec.planner.physical.Prel)1 SelectionVectorRemoverPrel (org.apache.drill.exec.planner.physical.SelectionVectorRemoverPrel)1 SerializedField (org.apache.drill.exec.proto.UserBitShared.SerializedField)1 VectorWrapper (org.apache.drill.exec.record.VectorWrapper)1 ValueVector (org.apache.drill.exec.vector.ValueVector)1 RowSetReader (org.apache.drill.test.rowSet.RowSet.RowSetReader)1