private void updateStatsForTruncate(Map<String,String> props, EnvironmentContext environmentContext) {
    if (null == props) {
      return;
    }
    for (String stat : StatsSetupConst.SUPPORTED_STATS) {
      String statVal = props.get(stat);
      if (statVal != null) {
        //In the case of truncate table, we set the stats to be 0.
        props.put(stat, "0");
      }
    }
    //first set basic stats to true
    StatsSetupConst.setBasicStatsState(props, StatsSetupConst.TRUE);
    environmentContext.putToProperties(StatsSetupConst.STATS_GENERATED, StatsSetupConst.TASK);
    environmentContext.putToProperties(StatsSetupConst.DO_NOT_POPULATE_QUICK_STATS, StatsSetupConst.TRUE);
    //then invalidate column stats
    StatsSetupConst.clearColumnStatsState(props);
    return;
  }
Deletes the partitions specified by catName, dbName, tableName. If checkLocation is true, for
locations of partitions which may not be subdirectories of tablePath checks to make sure the
locations are writable.

Drops the metadata for each partition.

Provides a list of locations of partitions which may not be subdirectories of tablePath.

@param ms RawStore to use for metadata retrieval and delete
@param catName The catName
@param dbName The dbName
@param tableName The tableName
@param tablePath The tablePath of which subdirectories does not have to be checked
@param checkLocation Should we check the locations at all
@return The list of the Path objects to delete (only in case checkLocation is true)
@throws MetaException
@throws IOException
@throws NoSuchObjectException
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java