singhpk234 commented on code in PR #14659:
URL: https://github.com/apache/iceberg/pull/14659#discussion_r2553705069


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java:
##########
@@ -148,13 +148,15 @@ public EncryptionManager encryption() {
     if (tableKeyId != null) {
       if (keyManagementClient == null) {
         throw new RuntimeException(
-            "Cant create encryption manager, because key management client is 
not set");
+            "Cannot create encryption manager without a key management 
client");

Review Comment:
   IllegalArgs or a Precondition prompting the key to be set sounds reasonable 
to me 



##########
spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/sql/TestTableEncryption.java:
##########
@@ -166,7 +166,7 @@ public void testInsertAndDelete() {
   public void testKeyDelete() {
     assertThatThrownBy(
             () -> sql("ALTER TABLE %s UNSET TBLPROPERTIES 
(`encryption.key-id`)", tableName))
-        .hasMessageContaining("Cannot remove key in encrypted table");
+        .hasMessageContaining("Cannot remove encryption key ID from an 
encrypted table");

Review Comment:
   can we check the execption class too ? 



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