feat(RTAS): add TableMetadataBuilder::build_replacement - #3057
Draft
xanderbailey wants to merge 3 commits into
Draft
feat(RTAS): add TableMetadataBuilder::build_replacement#3057xanderbailey wants to merge 3 commits into
xanderbailey wants to merge 3 commits into
Conversation
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.
xanderbailey
marked this pull request as draft
August 25, 2026 14:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
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.Are these changes tested?
AI Disclosure
Used to review and write tests