PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf,sm);
PhysicalExec exec = phyPlanner.createPlan(ctx, rootNode);
ExternalSortExec sort = null;
if (exec instanceof ProjectionExec) {
ProjectionExec projExec = (ProjectionExec) exec;
sort = projExec.getChild();
} else if (exec instanceof ExternalSortExec) {
sort = (ExternalSortExec) exec;
} else {
assertTrue(false);
}