blackmwk commented on code in PR #2650:
URL: https://github.com/apache/iceberg-rust/pull/2650#discussion_r3550637429
##########
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:
Sounds reasonable to me, but should we also change Catalog api? It's also
optional in catalog. Also please change all docs to say
KmsClient/KmsClientFactory is optional.
--
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]