Skip to content

Commit

Permalink
Remove stale tests from Flink.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdblue committed Feb 11, 2025
1 parent 9e5810f commit 585c763
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");

// Adding an existing field should fail due to Flink's internal validation.
assertThatThrownBy(() -> sql("ALTER TABLE tl ADD (id STRING)"))
Expand Down Expand Up @@ -446,12 +441,6 @@ public void testAlterTableModifyColumnNullability() {
Types.NestedField.required(1, "id", Types.IntegerType.get()),
Types.NestedField.optional(2, "dt", Types.StringType.get()))
.asStruct());
// Changing nullability from optional to required should fail
// because Iceberg's SchemaUpdate does not allow incompatible changes.
assertThatThrownBy(() -> sql("ALTER TABLE tl MODIFY (dt STRING NOT NULL)"))
.isInstanceOf(TableException.class)
.hasRootCauseInstanceOf(IllegalArgumentException.class)
.hasRootCauseMessage("Cannot change column nullability: dt: optional -> required");

// Set nullability from required to optional
sql("ALTER TABLE tl MODIFY (id INTEGER)");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");

// Adding an existing field should fail due to Flink's internal validation.
assertThatThrownBy(() -> sql("ALTER TABLE tl ADD (id STRING)"))
Expand Down Expand Up @@ -446,12 +441,6 @@ public void testAlterTableModifyColumnNullability() {
Types.NestedField.required(1, "id", Types.IntegerType.get()),
Types.NestedField.optional(2, "dt", Types.StringType.get()))
.asStruct());
// Changing nullability from optional to required should fail
// because Iceberg's SchemaUpdate does not allow incompatible changes.
assertThatThrownBy(() -> sql("ALTER TABLE tl MODIFY (dt STRING NOT NULL)"))
.isInstanceOf(TableException.class)
.hasRootCauseInstanceOf(IllegalArgumentException.class)
.hasRootCauseMessage("Cannot change column nullability: dt: optional -> required");

// Set nullability from required to optional
sql("ALTER TABLE tl MODIFY (id INTEGER)");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");

// Adding an existing field should fail due to Flink's internal validation.
assertThatThrownBy(() -> sql("ALTER TABLE tl ADD (id STRING)"))
Expand Down Expand Up @@ -446,12 +441,6 @@ public void testAlterTableModifyColumnNullability() {
Types.NestedField.required(1, "id", Types.IntegerType.get()),
Types.NestedField.optional(2, "dt", Types.StringType.get()))
.asStruct());
// Changing nullability from optional to required should fail
// because Iceberg's SchemaUpdate does not allow incompatible changes.
assertThatThrownBy(() -> sql("ALTER TABLE tl MODIFY (dt STRING NOT NULL)"))
.isInstanceOf(TableException.class)
.hasRootCauseInstanceOf(IllegalArgumentException.class)
.hasRootCauseMessage("Cannot change column nullability: dt: optional -> required");

// Set nullability from required to optional
sql("ALTER TABLE tl MODIFY (id INTEGER)");
Expand Down

0 comments on commit 585c763

Please sign in to comment.