private Pair<Number,Number> extractMaxMin(RexInputRef ref) {

      ColStatistics cs = extractColStats(ref);
      Number max = null;
      Number min = null;
      if (cs != null && cs.getRange()!=null) {
        max = cs.getRange().maxValue;
        min = cs.getRange().minValue;
      }
      return Pair.<Number, Number> of(max, min);
    }
Replaces expressions with their reductions. Note that we only have to
look for RexCall, since nothing else is reducible in the first place.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsWithStatsRule.java