xanderbailey opened a new pull request, #3701: URL: https://github.com/apache/iceberg-rust/pull/3701
## Which issue does this PR close? - Working towards https://github.com/apache/iceberg-rust/issues/3056 ## What changes are included in this PR? Each action derives its requirements from the transaction-local table, so a later action asserts state that an earlier action in the same transaction wrote. Catalogs check requirements against the transaction base, so today two fast appends in one transaction fail with `Requirement failed: Branch or tag main not found`. The same applies to `update_schema` followed by `update_schema` or `replace_sort_order` (current schema id) and to two `replace_sort_order` actions (default sort order id). `Transaction` now keeps only the first requirement on each value, since that is the one derived from the base. Refs are matched by name and other requirements by kind. REPLACE TABLE needs this to commit the replacement and the append of its new contents in one transaction. #3075 took the same approach alongside other changes and was closed as stale without review. ## Are these changes tested? Yes. A `MemoryCatalog` test commits two fast appends in one transaction (it fails on `main`), and a unit test covers which requirements are kept, including distinct refs. ## AI Disclosure Used to investigate the failure, write the change and tests. Worth a look: dropping a later requirement assumes the earlier action's requirement on that value was derived from the base, which holds for every current action because each one asserts the values it changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
