throw new UndefinedTableException(alterTable.getTableName()); if (catalog.existsTable(databaseName, alterTable.getNewTableName())) { throw new DuplicateTableException(alterTable.getNewTableName()); databaseName, simpleTableName); newPath = StorageUtil.concatPath(context.getConf().getVar(TajoConf.ConfVars.WAREHOUSE_DIR), databaseName, alterTable.getNewTableName()); FileSystem fs = oldPath.getFileSystem(context.getConf()); catalog.alterTable(CatalogUtil.renameTable(qualifiedName, alterTable.getNewTableName(), AlterTableType.RENAME_TABLE, newPath)); break;
throw new UndefinedTableException(alterTable.getTableName()); if (catalog.existsTable(databaseName, alterTable.getNewTableName())) { throw new DuplicateTableException(alterTable.getNewTableName()); databaseName, simpleTableName); newPath = StorageUtil.concatPath(context.getConf().getVar(TajoConf.ConfVars.WAREHOUSE_DIR), databaseName, alterTable.getNewTableName()); FileSystem fs = oldPath.getFileSystem(context.getConf()); catalog.alterTable(CatalogUtil.renameTable(qualifiedName, alterTable.getNewTableName(), newPath)); break;
case RENAME_TABLE: alterTableBuilder.setSetType(PlanProto.AlterTableNode.Type.RENAME_TABLE); alterTableBuilder.setRenameTable(RenameTable.newBuilder().setNewName(node.getNewTableName())); break; case ADD_COLUMN:
case RENAME_TABLE: alterTableBuilder.setSetType(PlanProto.AlterTableNode.Type.RENAME_TABLE); alterTableBuilder.setRenameTable(RenameTable.newBuilder().setNewName(node.getNewTableName())); break; case ADD_COLUMN: