use of org.apache.drill.exec.store.mock.MockScanBatchCreator in project drill by apache.
the class ExpressionInterpreterTest method createMockScanBatch.
@SuppressWarnings("resource")
private ScanBatch createMockScanBatch(Drillbit bit, MockSubScanPOP scanPOP, BitControl.PlanFragment planFragment) {
final List<RecordBatch> children = Lists.newArrayList();
final MockScanBatchCreator creator = new MockScanBatchCreator();
try {
final FragmentContext context = new FragmentContext(bit.getContext(), planFragment, null, bit.getContext().getFunctionImplementationRegistry());
return creator.getBatch(context, scanPOP, children);
} catch (Exception ex) {
throw new DrillRuntimeException("Error when setup fragment context" + ex);
}
}
Aggregations