xanderbailey commented on code in PR #4159:
URL: https://github.com/apache/iceberg-python/pull/4159#discussion_r4496852686


##########
pyiceberg/table/__init__.py:
##########
@@ -1345,13 +1347,29 @@ def __init__(
         io: FileIO,
         catalog: Catalog,
         config: dict[str, str] = EMPTY_DICT,
+        kms_client: KeyManagementClient | None = None,
     ) -> None:
         self._identifier = identifier
         self.metadata = metadata
         self.metadata_location = metadata_location
         self.io = io
         self.catalog = catalog
         self.config = config
+        self._kms_client = kms_client
+        self._encryption_manager: tuple[TableMetadata, EncryptionManager | 
None] | None = None

Review Comment:
   ```
   @property
   def metadata(self) -> TableMetadata: return self._metadata
   
   @metadata.setter
   def metadata(self, value: TableMetadata) -> None:
       self._metadata = value
       self.__dict__.pop("encryption_manager", None)
   
   @functools.cached_property
   def encryption_manager(self) -> EncryptionManager | None: ...
   ```
   Claude had this alternative idea, I do think caching the EM might be a good 
idea rather than recreating it on every get? WDYT?



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