use of org.apache.drill.exec.store.mapr.db.json.RestrictedJsonRecordReader in project drill by apache.
the class MapRDBRestrictedScanBatchCreator method getBatch.
@Override
public ScanBatch getBatch(ExecutorFragmentContext context, RestrictedMapRDBSubScan subScan, List<RecordBatch> children) throws ExecutionSetupException {
Preconditions.checkArgument(children.isEmpty());
List<RecordReader> readers = Lists.newArrayList();
for (MapRDBSubScanSpec scanSpec : subScan.getRegionScanSpecList()) {
try {
readers.add(new RestrictedJsonRecordReader(scanSpec, subScan.getFormatPlugin(), subScan.getColumns(), context, subScan.getMaxRecordsToRead(), subScan.getSchema()));
} catch (Exception e1) {
throw new ExecutionSetupException(e1);
}
}
return new ScanBatch(subScan, context, readers, true);
}
Aggregations