nk1506 commented on code in PR #9432:
URL: https://github.com/apache/iceberg/pull/9432#discussion_r1445621596
##########
hive-metastore/src/main/java/org/apache/iceberg/hive/MetastoreUtil.java:
##########
@@ -72,6 +73,23 @@ public static void alterTable(
env.putAll(extraEnv);
env.put(StatsSetupConst.DO_NOT_UPDATE_STATS, StatsSetupConst.TRUE);
- ALTER_TABLE.invoke(client, databaseName, tblName, table, new
EnvironmentContext(env));
+ try {
+ ALTER_TABLE.invoke(client, databaseName, tblName, table, new
EnvironmentContext(env));
+ } catch (RuntimeException e) {
Review Comment:
Any thoughts on the test case
[testRenameTableDestinationTableAlreadyExists](https://github.com/apache/iceberg/blob/bc6b6e65ee221fc4c4f7f72d3585b768f7beeecb/hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCatalog.java#L1188)
since it expects error message as
```
.isInstanceOf(AlreadyExistsException.class)
.hasMessageContaining("Table already exists");
```
Currently we have override this as
```
.isInstanceOf(RuntimeException.class)
.hasMessageContaining("new table newdb.table_renamed already
exists");
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]