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


##########
crates/iceberg/src/table.rs:
##########
@@ -113,8 +113,15 @@ impl TableBuilder {
     /// If the table metadata has the `encryption.key-id` property set, a
     /// [`KeyManagementClient`] must be provided here so the table can build
     /// an [`EncryptionManager`]; otherwise [`Self::build`] will return an 
error.
-    pub fn kms_client(mut self, kms_client: Arc<dyn KeyManagementClient>) -> 
Self {
-        self.kms_client = Some(kms_client);
+    ///
+    /// Accepts either an `Arc<dyn KeyManagementClient>` or an
+    /// `Option<Arc<dyn KeyManagementClient>>`, so catalogs that hold an
+    /// optional client can forward it directly. Passing `None` is a no-op.
+    pub fn kms_client(

Review Comment:
   Sorry maybe I didn't quite follow, what's the recommendation here? You're 
happy with this API or should we change? To me it doesn't seem crazy for a 
genuinely optional parameter to have an optional builder.



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