@Override
  public int execute() throws HiveException {
    Table tbl = context.getDb().getTable(desc.getTableName(), true);

    check(tbl);
    setNewPartitionKeys(tbl);
    alterTable(tbl);

    return 0;
  }
Operation process of altering a partition to a table.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/alter/AlterTableAlterPartitionOperation.java