smaheshwar-pltr commented on code in PR #13225:
URL: https://github.com/apache/iceberg/pull/13225#discussion_r2553287222
##########
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:
Went with `IllegalArgumentException` but open to change. Also, I put up
https://github.com/apache/iceberg/pull/14659.
--
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]