protected AbstractAlterTableDesc createDesc(ASTNode command, TableName tableName, Map<String, String> partitionSpec,
      Map<String, String> properties, boolean isToTxn, boolean isExplicitStatsUpdate,
      EnvironmentContext environmentContext) throws SemanticException {
    boolean dropIfExists = command.getChild(1) != null;
    // validate Unset Non Existed Table Properties
    if (!dropIfExists) {
      Table table = getTable(tableName, true);
      Map<String, String> tableParams = table.getTTable().getParameters();
      for (String key : properties.keySet()) {
        if (!tableParams.containsKey(key)) {
          String errorMsg = "The following property " + key + " does not exist in " + table.getTableName();
          throw new SemanticException(ErrorMsg.ALTER_TBL_UNSET_NON_EXIST_PROPERTY.getMsg(errorMsg));
        }
      }
    }

    return new AlterTableUnsetPropertiesDesc(tableName, partitionSpec, null, isView(), properties,
        isExplicitStatsUpdate, environmentContext);
  }
Analyzer for unsetting the properties of table like entities commands.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/misc/properties/AbstractAlterTableUnsetPropertiesAnalyzer.java