smaheshwar-pltr commented on code in PR #13225:
URL: https://github.com/apache/iceberg/pull/13225#discussion_r2505907913


##########
core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java:
##########
@@ -152,6 +194,17 @@ public void commit(TableMetadata base, TableMetadata 
metadata) {
             String.format("Update type %s is not supported", updateType));
     }
 
+    if (base != null) {
+      Set<String> removedProps =
+          base.properties().keySet().stream()
+              .filter(key -> !metadata.properties().containsKey(key))
+              .collect(Collectors.toSet());
+
+      if (removedProps.contains(TableProperties.ENCRYPTION_TABLE_KEY)) {
+        throw new RuntimeException("Cannot remove key in encrypted table");
+      }

Review Comment:
   cc @ggershinsky perhaps similar situation to 
https://github.com/apache/iceberg/pull/13225#discussion_r2505900224.
   
   Thoughts on `IllegalArgumentException`? (If you alter this property and try 
to commit, `IllegalArgumentException` maybe makes sense?)



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