ArrayList<LogicalPlan> generatePlans = new ArrayList<LogicalPlan>();
String scope = load.getOperatorKey().scope;
for (int pos : columnsToProject) {
LogicalPlan projectPlan = new LogicalPlan();
LogicalOperator projectInput = load;
ExpressionOperator column = new LOProject(projectPlan, new OperatorKey(scope, NodeIdGenerator.getGenerator().getNextNodeId(scope)), projectInput, pos);
flattenList.add(false);
projectPlan.add(column);
generatePlans.add(projectPlan);
}
forEach = new LOForEach(mPlan, new OperatorKey(scope, NodeIdGenerator.getGenerator().getNextNodeId(scope)), generatePlans, flattenList);