pvary commented on code in PR #8918:
URL: https://github.com/apache/iceberg/pull/8918#discussion_r1389370838


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java:
##########
@@ -261,6 +261,12 @@ public void renameTable(TableIdentifier from, 
TableIdentifier originalTo) {
     } catch (InterruptedException e) {
       Thread.currentThread().interrupt();
       throw new RuntimeException("Interrupted in call to rename", e);
+    } catch (RuntimeException e) {

Review Comment:
   So we know that the HMS throws an `InvalidOperationException`, but I guess 
that the `MetastoreUtil.alterTable` wraps the exception to a `RuntimeException`.
   
   I guess that this is also true for the previous exceptions thrown by HMS:
   ```
       } 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 (TException e) {
         throw new RuntimeException("Failed to rename " + from + " to " + to, 
e);
       }
   ```
   
   Do we have tests for those?
   
   ------
   
   What I trying to understand if any of the HMS errors are handled correctly, 
or we only have to fix specific case



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

Reply via email to