smaheshwar-pltr commented on code in PR #14723:
URL: https://github.com/apache/iceberg/pull/14723#discussion_r2582415187
##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java:
##########
@@ -321,7 +321,14 @@ protected void doCommit(TableMetadata base, TableMetadata
metadata) {
}
if (removedProps.contains(TableProperties.ENCRYPTION_TABLE_KEY)) {
- throw new RuntimeException("Cannot remove key in encrypted table");
+ throw new IllegalArgumentException("Cannot remove key in encrypted
table");
+ }
+
+ if (base != null
+ && !Objects.equals(
+ base.properties().get(TableProperties.ENCRYPTION_TABLE_KEY),
+
metadata.properties().get(TableProperties.ENCRYPTION_TABLE_KEY))) {
Review Comment:
IIUC, this now means table REPLACEs must have the same key property as
before (+ you can't add a key when you replace).
Makes sense to me. WDYT about adding a test case to document that?
--
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]