GH-50801 [Python] Expose the record_batch_reader_source Acero node (RecordBatchReaderSourceNodeOptions) - #50802
Open
owenowenisme wants to merge 1 commit into
Conversation
record_batch_reader_source Acero node (RecordBatchReaderSourceNodeOptions)
|
|
Contributor
There was a problem hiding this comment.
Pull request overview
Exposes Acero’s record_batch_reader_source node options (RecordBatchReaderSourceNodeOptions) to Python so execution plans can stream data from a pyarrow.RecordBatchReader (including generator-backed readers) instead of requiring fully-materialized tables or dataset scans.
Changes:
- Added a Cython binding for
arrow::acero::RecordBatchReaderSourceNodeOptionsand exposed it aspyarrow.acero.RecordBatchReaderSourceNodeOptions. - Added Python tests covering basic usage, generator-backed laziness, generator error propagation, and a hash-join probe-side streaming example.
- Updated Python API docs to include the newly exposed options class.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| python/pyarrow/_acero.pyx | Adds the RecordBatchReaderSourceNodeOptions Cython wrapper that constructs the underlying Acero options object. |
| python/pyarrow/includes/libarrow_acero.pxd | Declares arrow::acero::RecordBatchReaderSourceNodeOptions for Cython to construct. |
| python/pyarrow/acero.py | Re-exports the new options class from the _acero extension for public Python use. |
| python/pyarrow/tests/test_acero.py | Adds coverage for streaming source behavior (including generator-backed readers and join integration). |
| docs/source/python/api/acero.rst | Documents the new options class in the public Acero Python API listing. |
Reranko05
reviewed
Aug 5, 2026
Reranko05
left a comment
Collaborator
There was a problem hiding this comment.
Could you edit the title to GH-<Issue Number>: [<Component>] <Title>, this will make it easier for maintainers.
record_batch_reader_source Acero node (RecordBatchReaderSourceNodeOptions) record_batch_reader_source Acero node (RecordBatchReaderSourceNodeOptions)
Author
|
@Reranko05 I updated the title, ty |
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.
Rationale for this change
Closes #50801
As title, this exposes RecordBatchReaderSourceNodeOptions to Python. With it, a hash join can build its hash table once and stream the probe side through as a generator-backed RecordBatchReader, releasing each input chunk as it is consumed, instead of materializing the full probe table up front (table_source) or pinning all fragments for the plan's lifetime (dataset scan).
Are these changes tested?
Yes
Are there any user-facing changes?
Yeah, users can pass RecordBatchReaderSourceNodeOptions into Declaration, but its not a breaking change
record_batch_reader_sourceAcero node (RecordBatchReaderSourceNodeOptions) #50801