xanderbailey commented on code in PR #3703:
URL: https://github.com/apache/iceberg-rust/pull/3703#discussion_r4813347003


##########
crates/catalog/rest/src/catalog.rs:
##########
@@ -1601,6 +1607,9 @@ impl SessionCatalog for RestSessionCatalog {
         if let Some(kms_client) = self.kms_client.clone() {
             table_builder = table_builder.kms_client(kms_client);
         }
+        if let Some(labels) = response.labels {

Review Comment:
   On the commit question: I'd carry the labels over. In Java, a commit updates 
the same `BaseTable`, so `labels()` survives it. `Transaction::do_commit` 
already loads the table first, so it could copy those labels onto the table 
that `update_table` returns.



##########
crates/iceberg/src/table.rs:
##########
@@ -301,6 +312,11 @@ impl Table {
         self.readonly
     }
 
+    /// Returns the labels the catalog returned with the table, if any.
+    pub fn labels(&self) -> Option<&Labels> {

Review Comment:
   Should this return `&Labels`, with `Labels` deriving `Default`? Java falls 
back to `Labels.EMPTY` instead of null. With `Option`, both a missing `labels` 
and `"labels": {}` mean no labels, but they look different to callers.



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