fix(scan): don't project a stale schema after a schema update with no write - #2904
Open
NoahKusaba wants to merge 3 commits into
Open
fix(scan): don't project a stale schema after a schema update with no write#2904NoahKusaba wants to merge 3 commits into
NoahKusaba wants to merge 3 commits into
Conversation
NoahKusaba
marked this pull request as draft
July 26, 2026 18:24
NoahKusaba
force-pushed
the
fix/scan-project-current-schema
branch
from
July 26, 2026 19:12
f57bc82 to
d8a703d
Compare
NoahKusaba
marked this pull request as ready for review
July 26, 2026 19:36
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?
changes
to:
let schema = match self.snapshot_id {
Some(_) => snapshot.schema(self.table.metadata())?,
None => self.table.metadata().current_schema().clone(),
};
If this doesn't remain a 3-4 line change, and becomes more complicated I will close the PR (Everything else is tests).
This is a minor bug not worth wasting too much reviewer time, hoping this can just be a simple fix.
Are these changes tested?
test_scan_of_current_state_reads_column_added_after_last_write: unpinned scan reads back the new column as null over pre-existing data files. Fails without the fix.
test_time_travel_scan_excludes_column_added_after_last_write: pinned scan still rejects that column. Guards the time-travel arm; passes either way by design.