@Deprecated
  @Override
  public Partition add_partition_with_environment_context( final Partition part, EnvironmentContext envContext)
          throws InvalidObjectException, AlreadyExistsException, MetaException {
    if (part == null) {
      throw new MetaException("Partition cannot be null.");
    }
    AddPartitionsRequest addPartitionsReq = new AddPartitionsRequest(part.getDbName(), part.getTableName(),
            new ArrayList<>(Arrays.asList(part)), false);
    addPartitionsReq.setEnvironmentContext(envContext);
    try {
      return add_partitions_req(addPartitionsReq).getPartitions().get(0);
    } catch (Exception e) {
      throw handleException(e).throwIfInstance(MetaException.class, InvalidObjectException.class,
          AlreadyExistsException.class).defaultMetaException();
    }
  }
Verify if update stats while altering partition(s)
For the following three cases HMS will not update partition stats
1) Table property 'DO_NOT_UPDATE_STATS' = True
2) HMS configuration property 'STATS_AUTO_GATHER' = False
3) Is View
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java