fix: preserve projected files across rebased writes - #9219
Open
lance-gatefixer[bot] wants to merge 6 commits into
Open
lance-gatefixer[bot] wants to merge 6 commits into
lance-gatefixer[bot] wants to merge 6 commits into
Conversation
# Conflicts: # rust/lance-table/src/transaction/manifest_build.rs
Contributor
There was a problem hiding this comment.
✅ Gate recommendation: approve.
With #9218 now in the base, this revision cleanly supplies the remaining Update half: it applies Project’s live-field rule to both staged updated fragments and new fragments, preserving mixed files while preventing fully projected-out files from returning. The strengthened Delete regression confirms the two fixes compose.
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.
Summary
Root cause
Delete and Update manifest application reused fragment post-images staged against the transaction read version. When a concurrent Project pruned files whose fields were all removed, those stale post-images could restore the files during rebase. RewriteColumns could also restore a newly written file for a column the Project had removed.
Delete now carries only its deletion-file delta onto the current fragment. The same rule covers a Project with preserves_nullability set to false; both Update rewrite modes are rejected earlier by the nullability conflict pre-check. Update filters both updated and new fragment files against the live projected schema while retaining mixed files that still contain a live field.
Validation
Fixes #9217