Open
Conversation
comphead
reviewed
Apr 20, 2026
comphead
approved these changes
Apr 20, 2026
Contributor
comphead
left a comment
There was a problem hiding this comment.
Thanks @2010YOUY01 makes sense
Co-authored-by: Oleks V <comphead@users.noreply.github.com>
xudong963
reviewed
Apr 21, 2026
| // schema of the current `SpillManager` | ||
| let actual_schema = reader.schema(); | ||
|
|
||
| if actual_schema != expected_schema { |
Member
There was a problem hiding this comment.
The equality includes metadata. So we also need to strict metadta?
Contributor
Author
There was a problem hiding this comment.
Good point. I’m not sure—some metadata may need to be preserved through the round trip.
What do you think about keeping the metadata comparison for now to stay conservative? If it proves unnecessarily strict later, we can relax it.
xudong963
approved these changes
Apr 21, 2026
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?
Rationale for this change
Follow-up to a review comment in : #21713 (comment)
Not a bug fix, this PR tries to be more defensive and catch potential bugs.
Before, when you write a spill file from a
SpillManager, then read with anotherSpillManagerof different schema, it would succeed. This is not a expected use pattern, an error will get propagated to the caller, and become harder to debug.This PR validates the schema when reading the first batch, and fail fast if the schema does not match.
Note it only validates the schema, if two
SpillManagers with the same schema do read and write, it's still allowed, but this is not a expected use pattern. Validating this case requires assigningSpillManagerUID, and add that to the Arrow IPC file metadata, can be tricky, so leave this as TODO for simplicity.What changes are included in this PR?
Are these changes tested?
UTs
Are there any user-facing changes?
No