this.pctx = pctx;
}
public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx,
Object... nodeOutputs) throws SemanticException {
FileSinkOperator FS = (FileSinkOperator) nd;
GroupByOperator cGBY = (GroupByOperator) stack.get(stack.size() - 3);
ReduceSinkOperator RS = (ReduceSinkOperator) stack.get(stack.size() - 4);
if (RS.getConf().getNumReducers() != 1 || !RS.getConf().getKeyCols().isEmpty()) {
return null;
}
GroupByOperator pGBY = (GroupByOperator) stack.get(stack.size() - 5);
Path fileName = FS.getConf().getFinalDirName();
TableDesc tsDesc = createIntermediateFS(pGBY, fileName);
for (AggregationDesc aggregation : cGBY.getConf().getAggregators()) {
List<ExprNodeDesc> parameters = aggregation.getParameters();
aggregation.setParameters(ExprNodeDescUtils.backtrack(parameters, cGBY, RS));