xanderbailey opened a new pull request, #3057: URL: https://github.com/apache/iceberg-rust/pull/3057
## 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. --> - Working towards https://github.com/apache/iceberg-rust/issues/3056 ## What changes are included in this PR? Replaces a table's schema, partition spec and sort order in place, leaving it with no current snapshot but keeping its uuid, properties and snapshots. This is the metadata side of `REPLACE TABLE`, where the caller writes the new contents and commits them together with the replacement. A column whose name the table already has keeps its field id, so data files written before the replacement stay readable through the columns the two schemas share. New columns are assigned above the table's last_column_id and never reuse the id of a dropped column. `ReassignFieldIds` grows a mode for this, matching ids by full field name so that nested fields are covered too. The existing `reassign_ids` gains nothing but a factored-out `rebind_to_schema`, which both paths use to rebuild the partition spec and sort order against the reassigned schema. <!-- 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 Used to review and write tests <!-- 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]
