This is an automated email from the ASF dual-hosted git repository.
pvary pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/main by this push:
new b7e65c9029 Core: Add test to validate we can't delete map value during
schema evolution (#15767)
b7e65c9029 is described below
commit b7e65c902936141666d56acad62c0eacf6aea3c5
Author: Mukund Thakur <[email protected]>
AuthorDate: Fri May 8 10:16:52 2026 -0500
Core: Add test to validate we can't delete map value during schema
evolution (#15767)
---
core/src/test/java/org/apache/iceberg/TestSchemaUpdate.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/core/src/test/java/org/apache/iceberg/TestSchemaUpdate.java
b/core/src/test/java/org/apache/iceberg/TestSchemaUpdate.java
index fb942dde2a..5325e4013c 100644
--- a/core/src/test/java/org/apache/iceberg/TestSchemaUpdate.java
+++ b/core/src/test/java/org/apache/iceberg/TestSchemaUpdate.java
@@ -1181,6 +1181,17 @@ public class TestSchemaUpdate {
.hasMessageStartingWith("Cannot delete map keys");
}
+ @Test
+ public void testDeleteMapValue() {
+ assertThatThrownBy(
+ () ->
+ new SchemaUpdate(SCHEMA, SCHEMA_LAST_COLUMN_ID)
+ .deleteColumn("locations.value")
+ .apply())
+ .isInstanceOf(IllegalArgumentException.class)
+ .hasMessageStartingWith("Cannot delete value type from map");
+ }
+
@Test
public void testAddFieldToMapKey() {
assertThatThrownBy(