public static long getMaxIfOverflow(long val) {
    return val < 0 ? Long.MAX_VALUE : val;
  }
negative number of rows or data sizes are invalid. It could be because of
long overflow in which case return Long.MAX_VALUE
@param val - input value
@return Long.MAX_VALUE if val is negative else val
ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java