JandyTenedora commented on code in PR #16960:
URL: https://github.com/apache/iceberg/pull/16960#discussion_r3730980955
##########
core/src/main/java/org/apache/iceberg/RewriteTablePathUtil.java:
##########
@@ -780,24 +781,22 @@ private static long rewriteDVFile(
String sourcePrefix,
String targetPrefix)
throws IOException {
- List<Blob> rewrittenBlobs = Lists.newArrayList();
- try (PuffinReader reader =
Puffin.read(io.newInputFile(deleteFile.location())).build()) {
- // Read all blobs and rewrite them with updated referenced data file
paths
- for (Pair<org.apache.iceberg.puffin.BlobMetadata, ByteBuffer> blobPair :
+ try (PuffinReader reader =
Puffin.read(io.newInputFile(deleteFile.location())).build();
+ PuffinWriter writer =
+
Puffin.write(outputFile).createdBy(IcebergBuild.fullVersion()).build()) {
Review Comment:
Hi @szehon-ho, I’ve been thinking more about this and am exploring whether
adding an overwrite option for Puffin
(https://github.com/JandyTenedora/iceberg/pull/1/files) would be cleaner than
the footer-read ordering and cleanup logic. I’ll continue working through the
details over the next few days, and I’d appreciate any thoughts you have.
--
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]