Search in sources :

Example 1 with BsonRecordReader

use of org.apache.drill.exec.store.bson.BsonRecordReader in project drill by apache.

the class MongoRecordReader method setup.

@Override
public void setup(OperatorContext context, OutputMutator output) throws ExecutionSetupException {
    this.operatorContext = context;
    this.writer = new VectorContainerWriter(output, unionEnabled);
    // BsonRecordReader
    if (isBsonRecordReader) {
        this.bsonReader = new BsonRecordReader(fragmentContext.getManagedBuffer(), Lists.newArrayList(getColumns()), readNumbersAsDouble);
        logger.debug("Initialized BsonRecordReader. ");
    } else {
        this.jsonReader = new JsonReader(fragmentContext.getManagedBuffer(), Lists.newArrayList(getColumns()), enableAllTextMode, false, readNumbersAsDouble);
        logger.debug(" Intialized JsonRecordReader. ");
    }
}
Also used : BsonRecordReader(org.apache.drill.exec.store.bson.BsonRecordReader) VectorContainerWriter(org.apache.drill.exec.vector.complex.impl.VectorContainerWriter) JsonReader(org.apache.drill.exec.vector.complex.fn.JsonReader)

Aggregations

BsonRecordReader (org.apache.drill.exec.store.bson.BsonRecordReader)1 JsonReader (org.apache.drill.exec.vector.complex.fn.JsonReader)1 VectorContainerWriter (org.apache.drill.exec.vector.complex.impl.VectorContainerWriter)1