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


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java:
##########
@@ -305,6 +305,12 @@ protected void doCommit(TableMetadata base, TableMetadata 
metadata) {
             !removedProps.contains(TableProperties.ENCRYPTION_TABLE_KEY),
             "Cannot remove key ID from an encrypted table");
 
+        Preconditions.checkArgument(
+            base.properties().containsKey(TableProperties.ENCRYPTION_TABLE_KEY)
+                || 
!metadata.properties().containsKey(TableProperties.ENCRYPTION_TABLE_KEY),
+            "Cannot add key ID to an existing table: set %s when creating the 
table",

Review Comment:
   I.e. I like how the added tests read. But I don't feel strongly



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