private void setStatsPropAndAlterPartitions(boolean resetStatistics, Table tbl,
                                              List<Partition> partitions,
                                              AcidUtils.TableSnapshot tableSnapshot)
          throws TException {
    if (partitions.isEmpty() || conf.getBoolVar(ConfVars.HIVE_STATS_AUTOGATHER)) {
      return;
    }
    EnvironmentContext ec = new EnvironmentContext();
    if (!resetStatistics) {
      ec.putToProperties(StatsSetupConst.DO_NOT_UPDATE_STATS, StatsSetupConst.TRUE);
    }
    if (LOG.isDebugEnabled()) {
      StringBuilder sb = new StringBuilder("Altering existing partitions ");
      partitions.forEach(p -> sb.append(p.getSpec()));
      LOG.debug(sb.toString());
    }

    String validWriteIdList = null;
    long writeId = 0L;
    if (tableSnapshot != null) {
      validWriteIdList = tableSnapshot.getValidWriteIdList();
      writeId = tableSnapshot.getWriteId();
    }
    getSynchronizedMSC().alter_partitions(tbl.getCatName(), tbl.getDbName(), tbl.getTableName(),
            partitions.stream().map(Partition::getTPartition).collect(Collectors.toList()),
            ec, validWriteIdList, writeId);
  }
Load Data commands for fullAcid tables write to base_x (if there is overwrite clause) or
delta_x_x directory - same as any other Acid write.  This method modifies the destPath to add
this path component.
@param writeId - write id of the operated table from current transaction (in which this operation is running)
@param stmtId - see {@link DbTxnManager#getStmtIdAndIncrement()}
@return appropriately modified path
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java