private SemanticNodeProcessor getMapSortedGroupbyProc(ParseContext pctx) {
    return new SortGroupByProcessor(pctx);
  }
This transformation does group by optimization. If the grouping key is a superset
of the bucketing and sorting keys of the underlying table in the same order, the
group by can be be performed on the map-side completely.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/GroupByOptimizer.java