ajantha-bhat commented on code in PR #6789:
URL: https://github.com/apache/iceberg/pull/6789#discussion_r1138604454


##########
nessie/src/main/java/org/apache/iceberg/nessie/NessieIcebergClient.java:
##########
@@ -307,12 +320,18 @@ namespace, getRef().getName()),
 
   public void renameTable(TableIdentifier from, TableIdentifier to) {
     getRef().checkMutable();
+    try {
+      getRef().refresh(api);
+    } catch (NessieNotFoundException e) {
+      throw new RuntimeException(e);
+    }
 
-    IcebergTable existingFromTable = table(from);
+    UpdateableReference updateableReference = getRef();
+    IcebergTable existingFromTable = table(from, 
updateableReference.getReference());

Review Comment:
   I get it now. rename and drop table doesn't have to worry about table state. 
Reverted 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