code: protected <E> void compare(Optional<E> existingValue, Optional<E> newValue) {
      boolean different;
      if (!newValue.isPresent()) {
        different = false;
      } else {
        different = !existingValue.isPresent() || !existingValue.get().equals(newValue.get());
      }
      this.result |= different;
    }
docs: Compare an existing value and a new value, and set {@link #result} accordingly.
  
  <p>
  This method returns false if newValue is absent (i.e., the existing value doesn't need to be updated).
  This is because when adding a table/partition to Hive, Hive automatically sets default values for
  some of the unspecified parameters. Therefore existingValue being present and newValue being absent
  doesn't mean the existing value needs to be updated.
  </p>