rdblue commented on code in PR #8907: URL: https://github.com/apache/iceberg/pull/8907#discussion_r1414721354
########## hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java: ########## @@ -234,15 +225,29 @@ public void renameTable(TableIdentifier from, TableIdentifier originalTo) { String fromName = from.name(); try { - Table table = clients.run(client -> client.getTable(fromDatabase, fromName)); - HiveOperationsBase.validateTableIsIceberg(table, fullTableName(name, from)); + Table fromTable = clients.run(client -> client.getTable(fromDatabase, fromName)); + HiveOperationsBase.validateTableIsIceberg(fromTable, fullTableName(name, from)); + Table table = null; + + try { + table = clients.run(client -> client.getTable(toDatabase, to.name())); Review Comment: Why does this need to call `getTable` a second time? Why doesn't `alterTable` handle the rename correctly already? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org