public static Long addWithExpDecay (List<Long> distinctVals) {
    // Exponential back-off for NDVs.
    // 1) Descending order sort of NDVs
    // 2) denominator = NDV1 * (NDV2 ^ (1/2)) * (NDV3 ^ (1/4))) * ....
    distinctVals.sort(Collections.reverseOrder());

    long denom = distinctVals.get(0);
    for (int i = 1; i < distinctVals.size(); i++) {
      denom = (long) (denom * Math.pow(distinctVals.get(i), 1.0 / (1 << i)));
    }

    return denom;
  }
Get column statistics expression nodes
@param conf
         - hive conf
@param parentStats
         - parent statistics
@param end
         - expression nodes
@return column statistics
ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java