Kurtiscwright opened a new pull request, #3024: URL: https://github.com/apache/iceberg-rust/pull/3024
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> - Closes #3023 ## What changes are included in this PR? <!-- Provide a summary of the modifications in this PR. List the main changes such as new features, bug fixes, refactoring, or any other updates. --> Adds path-based indexing of position delete files to `DeleteFileIndex`, mirroring Java's `posDeletesByPath`. - New `pos_deletes_by_path` map, replacing the commented-out TODO field. - New private helper `referenced_data_file`: uses the explicit `referenced_data_file` field when set, otherwise infers the path from equal `file_path` column bounds, matching `ContentFileUtil.referencedDataFile`. Unequal or missing bounds fall back to partition routing, so truncated bounds stay safe. - Routing in `PopulatedDeleteFileIndex::new` matches on content type first. Each delete lands in exactly one map. - `get_deletes_for_data_file` gains a path-keyed lookup arm with the same greater-than-or-equal sequence filter as the partition arm and no partition spec id check, matching Java's `findPathDeletes` so path-keyed deletes survive partition evolution. A file-scoped position delete is now returned only for the data file it references instead of for every file in its partition, so scans load delete files in proportion to the files actually scanned. Deletion vector support (`dvByPath` in Java) is out of scope. ## Are these changes tested? <!-- Specify what test covers (unit test, integration test, etc.). If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> Yes. Nine new unit tests alongside the two existing ones, all 11 pass: routing via the field and via bounds, fallback on unequal and one-sided bounds, path matching across partition spec ids, greater-than-or-equal sequence semantics, composition of path-keyed, partition-keyed, and global deletes for one data file, multiple deletes under one path key, and a partitioned delete with a referenced path routing by path. The two pre-existing tests had a hardcoded `referenced_data_file` removed from their builder so they continue to exercise partition routing. `make check` passes. ## AI Disclosure <!-- https://iceberg.apache.org/contribute/#guidelines-for-ai-assisted-contributions --> The production code was written by hand, guided by an AI-assisted review of the Java reference implementation. Doc comments and unit tests were drafted with AI assistance and reviewed by me. All changes were verified locally with `make check` and the crate's test suite. -- 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]
