singhpk234 commented on code in PR #19004:
URL: https://github.com/apache/iceberg/pull/19004#discussion_r4626651844
##########
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:
```suggestion
"Cannot add key ID to an existing table",
```
--
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]