wypoon commented on code in PR #15706:
URL: https://github.com/apache/iceberg/pull/15706#discussion_r2968573098
##########
spark/v3.4/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java:
##########
@@ -1766,6 +1766,16 @@ public void testCommitStateUnknownException() {
shouldHaveSnapshots(table, 2); // Commit actually Succeeded
}
+ @TestTemplate
+ public void testZOrderWithZColumnCollision() {
+ Table table = createTable(1);
+ table.updateSchema().addColumn("ICEZVALUE",
Types.StringType.get()).commit();
Review Comment:
You need to call `table.refresh()` before calling `table.updateSchema()`.
In other usages of `createTable(int)` in this file, either `table.refresh()`
is called directly or some other method is called (e.g.,
`shouldHaveFiles(Table, int)`) that calls it.
This is the reason for CI failing:
```
org.apache.iceberg.exceptions.CommitFailedException: Version 3 already
exists: file:/tmp/junit-15785874094065309995/metadata/v3.metadata.json
at
app//org.apache.iceberg.hadoop.HadoopTableOperations.renameToFinal(HadoopTableOperations.java:370)
at
app//org.apache.iceberg.hadoop.HadoopTableOperations.commit(HadoopTableOperations.java:162)
at app//org.apache.iceberg.SchemaUpdate.commit(SchemaUpdate.java:474)
at
app//org.apache.iceberg.spark.actions.TestRewriteDataFilesAction.testZOrderWithZColumnCollision(TestRewriteDataFilesAction.java:1772)
```
--
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]