rdblue commented on code in PR #12211:
URL: https://github.com/apache/iceberg/pull/12211#discussion_r1950087975
##########
flink/v1.18/flink/src/test/java/org/apache/iceberg/flink/TestFlinkCatalogTable.java:
##########
@@ -339,11 +339,6 @@ public void testAlterTableAddColumn() {
3, "col1", Types.StringType.get(), "comment for col1"),
Types.NestedField.optional(4, "col2",
Types.LongType.get()))
.asStruct());
- // Adding a required field should fail because Iceberg's SchemaUpdate does
not allow
- // incompatible changes.
- assertThatThrownBy(() -> sql("ALTER TABLE tl ADD (pk STRING NOT NULL)"))
- .hasRootCauseInstanceOf(IllegalArgumentException.class)
- .hasRootCauseMessage("Incompatible change: cannot add required column:
pk");
Review Comment:
I think it's better to remove these assertions than to update them. These
cases are covered by core tests for schema updates, which is the canonical
place to test behavior. Flink and Spark tests should validate the integration
(that the ADD COLUMN is passed) rather than the behavior (that NOT NULL is
rejected).
--
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]