plusplusjiajia commented on code in PR #2651:
URL: https://github.com/apache/iceberg-rust/pull/2651#discussion_r3976315829


##########
crates/catalog/rest/src/catalog.rs:
##########
@@ -1465,8 +1484,10 @@ impl SessionCatalog for RestSessionCatalog {
             }
         };
 
+        // The commit response carries no credentials, so build a plain FileIO;
+        // the transaction layer reuses the credentialed one it already holds.
         let file_io = self
-            .load_file_io(Some(&response.metadata_location), None)
+            .load_file_io(Some(&response.metadata_location), None, None)

Review Comment:
   @xanderbailey Good comparison — I think we're actually closer to it than it 
looks. `UpdateTableRequest` in Java doesn't carry a FileIO either; it stays on 
`TableOperations` and `commit()` leaves it alone. `do_commit` keeping the 
table's FileIO across `update_table` is the same idea, just spelled out because 
we build a fresh `Table` rather than mutating ops in place.
   
     On bullet-proofing: `TableCommit::build()` is `pub(crate)`, so `do_commit` 
ends up being the only caller `update_table` can have. I've added a note to the 
comment so that's easier to see



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