// PROJECTION
// ---------------------------------------------------
case MATERIALIZE:
case PROJECTION: {
for (Integer col_guid : node.getOutputColumnGUIDs()) {
PlanColumn col = plannerContext.get(col_guid);
assert (col != null) : "Invalid PlanColumn #" + col_guid;
if (col.getExpression() != null)
exps.add(col.getExpression());
} // FOR
break;
}
// ---------------------------------------------------
// AGGREGATE
// ---------------------------------------------------
case AGGREGATE:
case HASHAGGREGATE: {
AggregatePlanNode agg_node = (AggregatePlanNode) node;
for (Integer col_guid : agg_node.getAggregateColumnGuids()) {
PlanColumn col = plannerContext.get(col_guid);
assert (col != null) : "Invalid PlanColumn #" + col_guid;
if (col.getExpression() != null)
exps.add(col.getExpression());
} // FOR
for (Integer col_guid : agg_node.getGroupByColumnGuids()) {
PlanColumn col = plannerContext.get(col_guid);
assert (col != null) : "Invalid PlanColumn #" + col_guid;
if (col.getExpression() != null)
exps.add(col.getExpression());
} // FOR
break;
}
// ---------------------------------------------------
// ORDERBY
// ---------------------------------------------------
case ORDERBY: {
OrderByPlanNode orby_node = (OrderByPlanNode) node;
for (Integer col_guid : orby_node.getSortColumnGuids()) {
PlanColumn col = plannerContext.get(col_guid);
assert (col != null) : "Invalid PlanColumn #" + col_guid;
if (col.getExpression() != null)
exps.add(col.getExpression());
} // FOR
break;
}
default:
// Do nothing...