@Override
  public Partition exchange_partition(Map<String, String> partitionSpecs,
                                      String sourceDbName, String sourceTableName, String destDbName,
                                      String destTableName) throws TException {
    exchange_partitions(partitionSpecs, sourceDbName, sourceTableName, destDbName, destTableName);
    // Wouldn't it make more sense to return the first element of the list returned by the
    // previous call?
    return new Partition();
  }
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