Fokko commented on code in PR #7398:
URL: https://github.com/apache/iceberg/pull/7398#discussion_r1175670921
##########
core/src/test/java/org/apache/iceberg/TestPartitioning.java:
##########
@@ -386,4 +386,26 @@ public void
testGroupingKeyTypeWithIncompatibleSpecEvolution() {
"Conflicting partition fields",
() -> Partitioning.groupingKeyType(table.schema(),
table.specs().values()));
}
+
+ @Test
+ public void testDeletingPartitionField() {
+ TestTables.TestTable table =
+ TestTables.create(tableDir, "test", SCHEMA, BY_DATA_SPEC,
V1_FORMAT_VERSION);
+
+ table.updateSpec().removeField("data").commit();
+
+ table.updateSchema().deleteColumn("data").commit();
+
+ // This would throw a NPE
Review Comment:
I agree that it is better to remove it, thanks!
--
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]