public static void scaleColStatistics(List<ColStatistics> colStats, double factor) {
    for (ColStatistics cs : colStats) {
      cs.setNumFalses(StatsUtils.safeMult(cs.getNumFalses(), factor));
      cs.setNumTrues(StatsUtils.safeMult(cs.getNumTrues(), factor));
      cs.setNumNulls(StatsUtils.safeMult(cs.getNumNulls(), factor));
      if (factor < 1.0) {
        final double newNDV = Math.ceil(cs.getCountDistint() * factor);
        cs.setCountDistint(newNDV > Long.MAX_VALUE ? Long.MAX_VALUE : (long) newNDV);
      }
    }
  }
Update the basic statistics of the statistics object based on the row number
@param stats
         - statistics to be updated
@param newNumRows
         - new number of rows
@param useColStats
         - use column statistics to compute data size
ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java