manuzhang opened a new pull request, #17263: URL: https://github.com/apache/iceberg/pull/17263
## Summary Backports #17039 to `1.10.x`. - Fixes `_last_updated_sequence_number` inheritance to use a data file's `data_sequence_number` in scan constants. - Adds regression coverage for a v2 rewrite/compaction followed by a v3 upgrade and row ID assignment. - Applies the Spark regression to the versions supported on this branch: 3.4, 3.5, and 4.0. ## Problem A v2 rewrite can add a replacement file with a newer file sequence number while preserving the original data sequence number. If the table is later upgraded to v3, existing files do not contain materialized row-lineage columns, so readers inherit `_last_updated_sequence_number` from scan constants. Using `file_sequence_number` reports the rewrite snapshot instead of the sequence associated with the row content. The row-lineage specification requires inheritance from the data sequence number. ## Impact This preserves accurate row update sequence information for tables compacted before upgrading from v2 to v3, improving row-lineage auditability. ## Backport notes The production and core test changes are logically equivalent to #17039. Spark coverage is adapted from the versions on `main` to the Spark 3.4, 3.5, and 4.0 modules present on `1.10.x`. ## Testing - Local tests were not run, per repository instructions. - An independent code review found no issues and verified equivalence with the upstream fix. - CI validation is pending. --- **AI Disclosure** OpenAI Codex assisted with preparing and reviewing this backport publication. The commit includes the required co-author trailer. -- 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]
