Core: Fix branch snapshot scans when main is empty - #17735
Open
smaheshwar-pltr wants to merge 1 commit into
Open
Core: Fix branch snapshot scans when main is empty#17735smaheshwar-pltr wants to merge 1 commit into
smaheshwar-pltr wants to merge 1 commit into
Conversation
smaheshwar-pltr
commented
Aug 19, 2026
| } | ||
|
|
||
| @TestTemplate | ||
| void plansBranchSnapshotWhenMainIsEmptyAfterSchemaEvolution() throws IOException { |
Contributor
Author
There was a problem hiding this comment.
This test fails on main with:
Cannot find field 'data' in struct: struct<1: id: required long, 3: part: required string>
3 tasks
Contributor
Author
|
Tagging in folks from #14438 and #13301 for potential reviews here, cc @ebyhr @chenjian2664 @singhpk234 @nastra |
ebyhr
approved these changes
Aug 20, 2026
| Table table = TestTables.create(temp, "test", SCHEMA, SPEC, formatVersion); | ||
|
|
||
| table.newAppend().appendFile(createDataFile("one")).toBranch("branch").commit(); | ||
| long snapshotId = table.snapshot("branch").snapshotId(); |
Member
There was a problem hiding this comment.
nit: We could rename the variable to branchSnapshotId to make its usage clearer.
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.
Closes #17734.
This PR removes the
currentSnapshot() == nullshortcut introduced in #13301, so that a snapshot rebinds partition specs to its own schema even when main is empty.See the PR for a test that fails on
main, demonstrating the filed issue.