Future<Collection<RunOutcome>> runRefInterpreterPlan(CompletionService<Collection<RunOutcome>> service) {
LogicalPlan parsedPlan = LogicalPlan.parse(DrillConfig.create(), plan);
IteratorRegistry ir = new IteratorRegistry();
DrillConfig config = DrillConfig.create();
config.setSinkQueues(0, queue);
final ReferenceInterpreter i = new ReferenceInterpreter(parsedPlan, ir, new BasicEvaluatorFactory(ir),
new RSERegistry(config));
try {
i.setup();
} catch (IOException e) {
throw new RuntimeException(e);
}
return service.submit(new Callable<Collection<RunOutcome>>() {
@Override
public Collection<RunOutcome> call() throws Exception {
Collection<RunOutcome> outcomes = i.run();
for (RunOutcome outcome : outcomes) {
System.out.println("============");
System.out.println(outcome);
if (outcome.outcome == RunOutcome.OutcomeType.FAILED && outcome.exception != null) {