siddiqueirshad opened a new pull request, #18681: URL: https://github.com/apache/iceberg/pull/18681
<!-- Thanks for opening a PR! Your contribution is much appreciated. --> ### Problem Statement `FileMetadata.deleteFileBuilder(spec).copy(deleteFile)` copies table partition data, metrics, format, bounds, split offsets, and deletion vector offsets, but omitted `equalityFieldIds`. When an equality delete file is copied and later used during scan planning, planning fails with a NullPointerException in `DeleteFileIndex.Builder.loadDeleteFiles` due to `equalityFieldIds` being null. Fixes #18630. ### Changes - In `FileMetadata.Builder.copy(DeleteFile toCopy)`, preserve `equalityFieldIds` by copying from `toCopy.equalityFieldIds()`. - Add test `testCopyEqualityDeleteFile` in `TestDeleteFiles` verifying that copying an equality-delete file retains both `FileContent.EQUALITY_DELETES` and the expected `equalityFieldIds`. ### Checklist - [x] I have read the [Contributing Guidelines](https://github.com/apache/iceberg/blob/main/CONTRIBUTING.md) - [x] All commits are signed off (`git commit -s`) - [x] Added unit tests verifying the fix -- 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]
