// } // FOR
// break;
// }
case DISTINCT: {
// Make sure the DISTINCT column is in the output columns
DistinctPlanNode cast_node = (DistinctPlanNode)node;
Integer distinct_col = cast_node.getDistinctColumnGuid();
assertTrue(String.format("%s is missing DISTINCT PlanColumn GUID %d in its output columns", cast_node, distinct_col),
cast_node.getOutputColumnGUIDs().contains(distinct_col));
break;
}
case HASHAGGREGATE:
case AGGREGATE: {
// Every PlanColumn referenced in this node must appear in its children's output
Collection<Integer> planCols = node.getOutputColumnGUIDs();
assert(planCols != null);
// System.err.println(PlanNodeUtil.debugNode(node));
AggregatePlanNode cast_node = (AggregatePlanNode)node;
assertEquals(cast_node.toString(), cast_node.getAggregateTypes().size(), cast_node.getAggregateColumnGuids().size());
assertEquals(cast_node.toString(), cast_node.getAggregateTypes().size(), cast_node.getAggregateColumnNames().size());
assertEquals(cast_node.toString(), cast_node.getAggregateTypes().size(), cast_node.getAggregateOutputColumns().size());
// Set<Integer> foundCols = new HashSet<Integer>();
// for (AbstractPlanNode child : node.getChildren()) {
// Collection<Integer> childCols = PlanNodeUtil.getOutputColumnIdsForPlanNode(child);