You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "smaheshwar-pltr (via GitHub)" <gi...@apache.org> on 2025/12/05 01:08:52 UTC

Re: [PR] Hive encryption nits [iceberg]

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


##########
spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/sql/TestTableEncryption.java:
##########
@@ -166,14 +167,28 @@ public void testInsertAndDelete() {
   public void testKeyDelete() {
     assertThatThrownBy(
             () -> sql("ALTER TABLE %s UNSET TBLPROPERTIES (`encryption.key-id`)", tableName))
-        .hasMessageContaining("Cannot remove key in encrypted table");
+        .isInstanceOf(SparkException.class)
+        .hasMessage("Unsupported table change: Cannot remove key ID from an encrypted table");
   }
 
   @TestTemplate
   public void testKeyAlter() {
     assertThatThrownBy(
             () -> sql("ALTER TABLE %s SET TBLPROPERTIES ('encryption.key-id'='abcd')", tableName))
-        .hasMessageContaining("Cannot modify key in encrypted table");
+        .isInstanceOf(SparkException.class)
+        .hasMessage("Unsupported table change: Cannot modify key ID of an encrypted table");
+  }
+
+  @TestTemplate
+  public void testReplaceKeyChange() {

Review Comment:
   Motiviation: https://github.com/apache/iceberg/pull/14723#discussion_r2582415187



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org