blackmwk commented on code in PR #2650:
URL: https://github.com/apache/iceberg-rust/pull/2650#discussion_r3551271633
##########
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:
I mean I'm still in favor of removing the Option, since other apis in this
crate adopt this approach, e.g. if a parameter is optional, user just don't
call the function to set it. It would be easier to ensure api consistency in
this repo.
--
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]