catalog.alterTable(CatalogUtil.renameTable(qualifiedName, alterTable.getNewTableName(), newPath)); break; throw new DuplicateColumnException(alterTable.getNewColumnName()); catalog.alterTable(CatalogUtil.renameColumn(qualifiedName, alterTable.getColumnName(), alterTable.getNewColumnName())); break; catalog.alterTable(CatalogUtil.addNewColumn(qualifiedName, alterTable.getAddNewColumn())); break; case SET_PROPERTY: catalog.alterTable(CatalogUtil.setProperty(qualifiedName, alterTable.getProperties())); break; case UNSET_PROPERTY: catalog.alterTable(CatalogUtil.unsetProperty(qualifiedName, alterTable.getUnsetPropertyKeys())); break; case ADD_PARTITION: catalog.alterTable(CatalogUtil.addOrDropPartition(qualifiedName, alterTable.getPartitionColumns(), alterTable.getPartitionValues(), alterTable.getLocation(), AlterTableType.ADD_PARTITION, numBytes)); throw new UndefinedPartitionException(pair.getSecond()); } else if (!undefinedPartition) { catalog.alterTable(CatalogUtil.addOrDropPartition(qualifiedName, alterTable.getPartitionColumns(), alterTable.getPartitionValues(), alterTable.getLocation(), AlterTableType.DROP_PARTITION));
catalog.alterTable(CatalogUtil.renameTable(qualifiedName, alterTable.getNewTableName(), AlterTableType.RENAME_TABLE, newPath)); break; throw new DuplicateColumnException(alterTable.getNewColumnName()); catalog.alterTable(CatalogUtil.renameColumn(qualifiedName, alterTable.getColumnName(), alterTable.getNewColumnName(), AlterTableType.RENAME_COLUMN)); break; throw new DuplicateColumnException(alterTable.getAddNewColumn().getSimpleName()); catalog.alterTable(CatalogUtil.addNewColumn(qualifiedName, alterTable.getAddNewColumn(), AlterTableType .ADD_COLUMN)); break; case SET_PROPERTY: catalog.alterTable(CatalogUtil.setProperty(qualifiedName, alterTable.getProperties(), AlterTableType .SET_PROPERTY)); break; catalog.alterTable(CatalogUtil.addOrDropPartition(qualifiedName, alterTable.getPartitionColumns(), alterTable.getPartitionValues(), alterTable.getLocation(), AlterTableType.ADD_PARTITION)); throw new UndefinedPartitionException(pair.getSecond()); } else if (!undefinedPartition) { catalog.alterTable(CatalogUtil.addOrDropPartition(qualifiedName, alterTable.getPartitionColumns(), alterTable.getPartitionValues(), alterTable.getLocation(), AlterTableType.DROP_PARTITION));