public static boolean isExternalTablePurge(Table table) {
    if (table == null) {
      return false;
    }
    Map<String, String> params = table.getParameters();
    if (params == null) {
      return false;
    }

    return isPropertyTrue(params, EXTERNAL_TABLE_PURGE);
  }
Determines whether an table needs to be purged or not.

@param table table of interest

@return true if external table needs to be purged
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java