szehon-ho commented on code in PR #12006:
URL: https://github.com/apache/iceberg/pull/12006#discussion_r1928243065
##########
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:
I think these may be great changes, but are they necessary for this? What
do you think to make a separate pr for these changes and have some explanation
there? It would make this specific change easier to review.
##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteTablePathSparkAction.java:
##########
@@ -710,7 +710,7 @@ private boolean fileExist(String path) {
return table.io().newInputFile(path).exists();
}
- private static String newPath(String path, String sourcePrefix, String
targetPrefix) {
+ static String newPath(String path, String sourcePrefix, String targetPrefix)
{
Review Comment:
its a bit messy but could we just use the util method in the test to avoid
having to expose yet another method?
--
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]