SubPlan subplan = new DistributedLogicalPlanner(session, metadata, idAllocator).createSubPlans(plan, true, featuresConfig.isDistributedIndexJoinsEnabled(), featuresConfig.isDistributedJoinsEnabled());
if (!subplan.getChildren().isEmpty()) {
throw new AssertionError("Expected subplan to have no children");
}
LocalExecutionPlanner executionPlanner = new LocalExecutionPlanner(
metadata,
sqlParser,
pageSourceManager,
indexManager,
recordSinkManager,
null,
compiler,
new IndexJoinLookupStats(),
new CompilerConfig().setInterpreterEnabled(false), // make sure tests fail if compiler breaks
new TaskManagerConfig()
);
// plan query
LocalExecutionPlan localExecutionPlan = executionPlanner.plan(session,
subplan.getFragment().getRoot(),
plan.getTypes(),
outputFactory);
// generate sources