nk1506 commented on code in PR #9432:
URL: https://github.com/apache/iceberg/pull/9432#discussion_r1446962785


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java:
##########
@@ -251,9 +251,15 @@ public void renameTable(TableIdentifier from, 
TableIdentifier originalTo) {
     } catch (NoSuchObjectException e) {
       throw new NoSuchTableException("Table does not exist: %s", from);
 
-    } catch (AlreadyExistsException e) {
-      throw new org.apache.iceberg.exceptions.AlreadyExistsException(
-          "Table already exists: %s", to);
+    } catch (RuntimeException e) {

Review Comment:
   I am not sure why we should explicitly catch MetaException here. Since it's 
already being handled with 
   ```
   catch (TException e) {
         throw new RuntimeException("Failed to rename " + from + " to " + to, 
e);
   
       }
   ```
   
   `InvalidOperationException` will always be wrapped with `RuntimeException` 
in case of alterTable. Either we should unwrap it `MetastoreUtil` or at every 
caller of it. 



-- 
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

Reply via email to