huaxingao commented on code in PR #13225:
URL: https://github.com/apache/iceberg/pull/13225#discussion_r2738732011


##########
core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java:
##########
@@ -156,6 +196,18 @@ public TableMetadata refresh() {
   @Override
   public void commit(TableMetadata base, TableMetadata metadata) {
     Endpoint.check(endpoints, Endpoint.V1_UPDATE_TABLE);
+
+    if (encryption() instanceof StandardEncryptionManager) {
+      // Add encryption keys to the to-be-committed metadata
+      TableMetadata.Builder builder = TableMetadata.buildFrom(metadata);
+      
EncryptionUtil.encryptionKeys(encryption()).values().forEach(builder::addEncryptionKey);

Review Comment:
   nit: `encryption()` is called multiple times. can we store it in a local 
variable?



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