newForEachInnerPlan.add(generate);
for (int i=0;i<foreach.getForEachPlans().size();i++) {
LogicalPlan innerPlan = foreach.getForEachPlans().get(i);
// Assume only one project is allowed in this level of foreach
LOProject project = (LOProject)innerPlan.iterator().next();
LOInnerLoad innerLoad = new LOInnerLoad(newForEachInnerPlan,
newForEach, project.isStar()?-1:project.getCol());
newForEachInnerPlan.add(innerLoad);
newForEachInnerPlan.connect(innerLoad, generate);
LogicalExpressionPlan expPlan = new LogicalExpressionPlan();
expPlans.add(expPlan);
ProjectExpression pe = new ProjectExpression(expPlan, i, -1, generate);