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: [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]