JandyTenedora opened a new pull request, #16960: URL: https://github.com/apache/iceberg/pull/16960
## Summary `rewriteDVFile` collected all rewritten blobs into an in-memory list before writing them out, creating unnecessary memory pressure for large DV files. This change opens the `PuffinReader` and `PuffinWriter` together and streams each blob directly to the output as it is read, keeping memory bounded to a single blob instead of the full file contents. Closes #15924 ## Changes - Open `PuffinReader` and `PuffinWriter` in the same try-with-resources block - Write each blob directly to the writer as it is read, removing the intermediate `List<Blob>` buffer - Add `rewriteDVFileRewritesReferencedDataFileInBlobMetadata` test that creates real serialized deletion vectors, rewrites the Puffin file, and verifies the output is readable by `DVUtil.readDV()` ## Test plan - [x] New test verifies `referenced-data-file` path is rewritten for matching prefixes and preserved for non-matching prefixes - [x] New test verifies blob payloads are preserved byte-for-byte through the rewrite - [x] New test verifies blob offsets and layout are correct in the rewritten file - [x] New test round-trips through `DVUtil.readDV()` to confirm the output is a valid DV file -- 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]
