default void preAlterTable(Table table, EnvironmentContext context) throws MetaException {
    String alterOpType = (context == null || context.getProperties() == null) ?
        null : context.getProperties().get(ALTER_TABLE_OPERATION_TYPE);
    // By default allow only ADDPROPS and DROPPROPS.
    // alterOpType is null in case of stats update.
    if (alterOpType != null && !allowedAlterTypes.contains(alterOpType)){
      throw new MetaException(
          "ALTER TABLE can not be used for " + alterOpType + " to a non-native table ");
    }
  }
Called before a table is altered in the metastore
during ALTER TABLE.

@param table new table definition
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaHook.java