public static class ColumnPrunerGroupByProc implements NodeProcessor {
public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx ctx, Object... nodeOutputs) throws SemanticException {
GroupByOperator op = (GroupByOperator)nd;
ColumnPrunerProcCtx cppCtx = (ColumnPrunerProcCtx)ctx;
List<String> colLists = new ArrayList<String>();
groupByDesc conf = op.getConf();
ArrayList<exprNodeDesc> keys = conf.getKeys();
for (exprNodeDesc key : keys)
colLists = Utilities.mergeUniqElems(colLists, key.getCols());
ArrayList<aggregationDesc> aggrs = conf.getAggregators();
for (aggregationDesc aggr : aggrs) {
ArrayList<exprNodeDesc> params = aggr.getParameters();
for (exprNodeDesc param : params)
colLists = Utilities.mergeUniqElems(colLists, param.getCols());
}