liurenjie1024 commented on code in PR #1873:
URL: https://github.com/apache/iceberg-rust/pull/1873#discussion_r2541189862


##########
crates/catalog/glue/src/catalog.rs:
##########
@@ -65,6 +65,18 @@ impl Default for GlueCatalogBuilder {
     }
 }
 
+impl GlueCatalogBuilder {
+    /// Get a mutable reference to the catalog configuration.
+    pub(crate) fn catalog_config(&mut self) -> &mut GlueCatalogConfig {

Review Comment:
   I'm not a big fan of such a change. I think a better approach would be 
following:
   
   ```rust
   pub struct GlueCatalogBuilder {
      name: Option<String>,
      ....
   }
   
   struct GlueCatalogConfig {
      name: String
   }
   ```
   
   This makes things easier to read, more importantly, the config class type 
safe. Builder struct need to store intermediate states, so it's reasonable to 
have it contains many optional fields. The config struct, which is finally 
built and verfied, should only contain valid states, e.g. it should no longer 
has unnecessary optional fields.



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