You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/11/11 17:19:52 UTC

[GitHub] [iceberg] aokolnychyi commented on a diff in pull request #6176: Spark 3.3: Preserve file seq numbers while rewriting manifests

aokolnychyi commented on code in PR #6176:
URL: https://github.com/apache/iceberg/pull/6176#discussion_r1020417580


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteManifestsSparkAction.java:
##########
@@ -374,8 +378,9 @@ private static ManifestFile writeManifest(
         Row row = rows.get(index);
         long snapshotId = row.getLong(0);
         long sequenceNumber = row.getLong(1);
-        Row file = row.getStruct(2);
-        writer.existing(wrapper.wrap(file), snapshotId, sequenceNumber);
+        Long fileSequenceNumber = row.isNullAt(2) ? null : row.getLong(2);

Review Comment:
   This action is long overdue for a refactoring and optimization. It would be more reliable to compute indices but I want to unblock asap.



##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteManifestsSparkAction.java:
##########
@@ -374,8 +378,9 @@ private static ManifestFile writeManifest(
         Row row = rows.get(index);
         long snapshotId = row.getLong(0);
         long sequenceNumber = row.getLong(1);
-        Row file = row.getStruct(2);
-        writer.existing(wrapper.wrap(file), snapshotId, sequenceNumber);
+        Long fileSequenceNumber = row.isNullAt(2) ? null : row.getLong(2);

Review Comment:
   This action is long overdue for a refactoring and optimization. It would be more reliable to compute indices but I want to unblock the release asap.



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org