public static boolean isFastStatsSame(Partition oldPart, Partition newPart) {
    // requires to calculate stats if new and old have different fast stats
    if ((oldPart != null) && oldPart.isSetParameters() && newPart != null && newPart.isSetParameters()) {
      for (String stat : StatsSetupConst.FAST_STATS) {
        if (oldPart.getParameters().containsKey(stat) && newPart.getParameters().containsKey(stat)) {
          Long oldStat = Long.parseLong(oldPart.getParameters().get(stat));
          String newStat = newPart.getParameters().get(stat);
          if (newStat == null || !oldStat.equals(Long.parseLong(newStat))) {
            return false;
          }
        } else {
          return false;
        }
      }
      return true;
    }
    return false;
  }
Determines whether the "fast stats" for the passed partitions are the same.

@param oldPart Old partition to compare.
@param newPart New partition to compare.
@return true if the partitions are not null, contain all the "fast stats" and have the same values for these stats, otherwise false.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreServerUtils.java