Skip to content

GH-50801 [Python] Expose the record_batch_reader_source Acero node (RecordBatchReaderSourceNodeOptions) - #50802

Open
owenowenisme wants to merge 1 commit into
apache:mainfrom
owenowenisme:owenowenisme/Bind-build-side-table-reuse-in-pyarrow
Open

GH-50801 [Python] Expose the record_batch_reader_source Acero node (RecordBatchReaderSourceNodeOptions) #50802
owenowenisme wants to merge 1 commit into
apache:mainfrom
owenowenisme:owenowenisme/Bind-build-side-table-reuse-in-pyarrow

Conversation

@owenowenisme

@owenowenisme owenowenisme commented Aug 4, 2026

Copy link
Copy Markdown

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

Signed-off-by: You-Cheng Lin <mses010108@gmail.com>
@owenowenisme
owenowenisme requested a review from AlenkaF as a code owner August 4, 2026 08:58
Copilot AI lite review requested due to automatic review settings August 4, 2026 08:58
@owenowenisme
owenowenisme requested review from raulcd and rok as code owners August 4, 2026 08:58
@owenowenisme owenowenisme changed the title GH-50801 Expose the record_batch_reader_source Acero node (RecordBatchReaderSourceNodeOptions) GH-50801 Expose the record_batch_reader_source Acero node (RecordBatchReaderSourceNodeOptions) Aug 4, 2026
@github-actions github-actions Bot added the awaiting review Awaiting review label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

⚠️ GitHub issue #50801 has been automatically assigned in GitHub to PR creator.

Copilot AI left a comment

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.

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::RecordBatchReaderSourceNodeOptions and exposed it as pyarrow.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.

Comment thread python/pyarrow/_acero.pyx

@Reranko05 Reranko05 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you edit the title to GH-<Issue Number>: [<Component>] <Title>, this will make it easier for maintainers.

@owenowenisme owenowenisme changed the title GH-50801 Expose the record_batch_reader_source Acero node (RecordBatchReaderSourceNodeOptions) GH-50801 [Python] Expose the record_batch_reader_source Acero node (RecordBatchReaderSourceNodeOptions) Aug 5, 2026
@owenowenisme

Copy link
Copy Markdown
Author

@Reranko05 I updated the title, ty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review Awaiting review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Python] Expose the record_batch_reader_source Acero node (RecordBatchReaderSourceNodeOptions)

3 participants