dramaticlly commented on code in PR #12006:
URL: https://github.com/apache/iceberg/pull/12006#discussion_r1928932547
##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java:
##########
@@ -923,16 +1005,20 @@ protected void checkFileNum(
.load(result.fileListLocation())
.as(Encoders.STRING())
.collectAsList();
- assertThat(filesToMove.stream().filter(f ->
f.endsWith(".metadata.json")).count())
- .withFailMessage("Wrong rebuilt version file count")
+ Predicate<String> isManifest = f -> (f.endsWith("-m0.avro")) ||
(f.endsWith("-m1.avro"));
Review Comment:
Sorry about the confusion, yeah I think this might be needed for testing out
the change. I realize that the overwrite of unpartitioned table generate 2
manifests where `m0.avro` contains the deleted entry of old data file and
`m1.avro` contains the appended entry for new data file. So previous we only
consider file name ends up with `m0.avro` as manifest count might be a off.
Also moved away from `withFailMessage()` to `as()` to provide a little bit
more context incase of assertion failure.
--
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]