nastra commented on code in PR #13837:
URL: https://github.com/apache/iceberg/pull/13837#discussion_r2290333510
##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteTablePathSparkAction.java:
##########
@@ -304,12 +307,29 @@ private String rebuildMetadata() {
.collect(Collectors.toSet());
rewritePositionDeletes(deleteFiles);
+ ImmutableRewriteTablePath.Result.Builder builder =
+ ImmutableRewriteTablePath.Result.builder()
+ .stagingLocation(stagingDir)
+ .rewrittenDeleteFilesCount(deleteFiles.size())
+ .rewrittenManifestFilesCount(metaFiles.size())
+ .latestVersion(RewriteTablePathUtil.fileName(endVersionName));
+
+ // skip file list
+ if (skipFileList) {
+ return builder.build();
+ }
+
Set<Pair<String, String>> copyPlan = Sets.newHashSet();
copyPlan.addAll(rewriteVersionResult.copyPlan());
copyPlan.addAll(rewriteManifestListResult.copyPlan());
copyPlan.addAll(rewriteManifestResult.copyPlan());
+ String fileListLocation = saveFileList(copyPlan);
- return saveFileList(copyPlan);
+ return builder
+ .stagingLocation(stagingDir)
+ .fileListLocation(fileListLocation)
Review Comment:
I think another issue is actually that `fileListLocation` is as mandatory
property in
https://github.com/apache/iceberg/blob/26259d8d0d4e8cc19d5fb8b984c42e8f9b0c6488/api/src/main/java/org/apache/iceberg/actions/RewriteTablePath.java#L121
(it's using Immutables and anything not marked as optional or nullable is a
required field to be set when the object is being created). That being said, we
can't make it optional/nullable at the API level, as that would break the API
contract. Are we going to put a dummy string in there?
--
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]