xanderbailey opened a new pull request, #3132: URL: https://github.com/apache/iceberg-rust/pull/3132
## 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 #. This came up as a part of the discussion in https://github.com/apache/iceberg-rust/pull/2936 ## What changes are included in this PR? This PR adds `LiveManifestEntry`, an internal representation used during scan planning. `ManifestEntry` continues to reflect the serialized manifest format, where `sequence_number` is optional because an `ADDED` entry may inherit it from the containing manifest. After inheritance, however, every live entry must have a data sequence number, so `LiveManifestEntry` represents that the value is required. The distinction also preserves compatibility with older v2 manifests that contain deleted entries with null data sequence numbers. Those entries can still be parsed and ignored because they are no longer live, while an `ADDED` or `EXISTING` entry that remains null after inheritance is treated as invalid data. This invariant is intentionally not enforced in ManifestReader::read. The manifest reader loads the complete manifest, including deleted historical entries, and is used outside scan planning. Rejecting null sequence numbers there would make an otherwise readable manifest fail because of an entry that cannot affect the current snapshot. Instead, the scan path applies inheritance first, filters out deleted entries, and then converts the remaining entries into LiveManifestEntry. Scan and delete-index code now operate on `LiveManifestEntry`, removing optional sequence-number comparisons and the previous fallback that applied deletes unconditionally when the data sequence number was missing. <!-- Provide a summary of the modifications in this PR. List the main changes such as new features, bug fixes, refactoring, or any other updates. --> ## 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)? --> ## AI Disclosure <!-- https://iceberg.apache.org/contribute/#guidelines-for-ai-assisted-contributions --> -- 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]
