diff --git a/paimon-core/src/test/java/org/apache/paimon/table/SchemaEvolutionTest.java b/paimon-core/src/test/java/org/apache/paimon/table/SchemaEvolutionTest.java index cb0499bbd71e0..c2fa5439f56c7 100644 --- a/paimon-core/src/test/java/org/apache/paimon/table/SchemaEvolutionTest.java +++ b/paimon-core/src/test/java/org/apache/paimon/table/SchemaEvolutionTest.java @@ -427,14 +427,14 @@ public void testDropField() throws Exception { schemaManager.commitChanges( Collections.singletonList(SchemaChange.dropColumn("f0")))) .isInstanceOf(UnsupportedOperationException.class) - .hasMessage(String.format("Cannot drop/rename partition key[%s]", "f0")); + .hasMessage(String.format("Cannot drop partition key or primary key: [%s]", "f0")); assertThatThrownBy( () -> schemaManager.commitChanges( Collections.singletonList(SchemaChange.dropColumn("f2")))) .isInstanceOf(UnsupportedOperationException.class) - .hasMessage(String.format("Cannot drop/rename primary key[%s]", "f2")); + .hasMessage(String.format("Cannot drop partition key or primary key: [%s]", "f2")); } @Test