Skip to content

minor: More comments to read_spill_as_stream#21713

Merged
2010YOUY01 merged 2 commits intoapache:mainfrom
2010YOUY01:spill-util-comment
Apr 20, 2026
Merged

minor: More comments to read_spill_as_stream#21713
2010YOUY01 merged 2 commits intoapache:mainfrom
2010YOUY01:spill-util-comment

Conversation

@2010YOUY01
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • Closes #.

Rationale for this change

Clarifying a function with more comments

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

/// Reads a spill file as a stream. The file must be created by the current `SpillManager`.
/// This method will generate output in FIFO order: the batch appended first
/// will be read first.
/// Reads a spill file as a stream. The file must be created by the current
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what would happen if file created by another SpillManager? would the file be ignored or crash?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the code—it appears to succeed silently, and error would be propagated to the stream consumer due to a schema mismatch.
I’ve updated the comment to indicate this may lead to undefined behavior.
We could be more defensive here; I’ll send a follow-up patch to make it fail fast.

Copy link
Copy Markdown
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @2010YOUY01

@2010YOUY01 2010YOUY01 added this pull request to the merge queue Apr 20, 2026
Merged via the queue into apache:main with commit 3aaf393 Apr 20, 2026
35 checks passed
@2010YOUY01 2010YOUY01 deleted the spill-util-comment branch April 20, 2026 01:27
Rich-T-kid pushed a commit to Rich-T-kid/datafusion that referenced this pull request Apr 21, 2026
## Which issue does this PR close?

<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closes apache#123` indicates that this PR will close issue apache#123.
-->

- Closes #.

## Rationale for this change

<!--
Why are you proposing this change? If this is already explained clearly
in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.
-->
Clarifying a function with more comments

## What changes are included in this PR?

<!--
There is no need to duplicate the description in the issue here but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->

## Are these changes tested?

<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code

If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->

## Are there any user-facing changes?

<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->

<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants