private long getParentNumRows(GroupByOperator op, List<ExprNodeDesc> gbyKeys, HiveConf conf) {
      if(gbyKeys == null || gbyKeys.isEmpty()) {
        return op.getParentOperators().get(0).getStatistics().getNumRows();
      }
      Operator<? extends OperatorDesc> parent = OperatorUtils.findSourceRS(op, gbyKeys);
      if(parent != null) {
        return parent.getStatistics().getNumRows();
      }
      return op.getParentOperators().get(0).getStatistics().getNumRows();
    }
If possible, sets the min / max value for the column based on the aggregate function
being calculated and its input.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java