sdd commented on code in PR #1302:
URL: https://github.com/apache/iceberg-rust/pull/1302#discussion_r2083986592


##########
crates/catalog/glue/src/catalog.rs:
##########
@@ -387,7 +387,7 @@ impl Catalog for GlueCatalog {
                 get_default_table_location(&ns, &db_name, &table_name, 
&self.config.warehouse)
             }
         };
-
+        creation.location = Some(location.clone());

Review Comment:
   Just a minor point: this now results in two clone calls, but I don't believe 
either are necessary if we refactor like this:
   
   ```rust
   let location = match &creation.location {
       Some(ref location) => location,
       None => {
           let ns = self.get_namespace(namespace).await?;
           let location = get_default_table_location(&ns, &db_name, 
&table_name, &self.config.warehouse);
           creation.location = Some(location);
           creation.location.as_ref().unwrap()
       }
   };
   
   let metadata_location = create_metadata_location(location, 0)?;
   let metadata = TableMetadataBuilder::from_table_creation(creation)?
       .build()?
       .metadata;
   ```



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