Skip to content

Add missing registration methods#1474

Open
timsaucer wants to merge 6 commits intoapache:mainfrom
timsaucer:feat/add-missing-registration-methods
Open

Add missing registration methods#1474
timsaucer wants to merge 6 commits intoapache:mainfrom
timsaucer:feat/add-missing-registration-methods

Conversation

@timsaucer
Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #1458

Rationale for this change

These functions are available in the upstream repo but not exposed in Python

What changes are included in this PR?

Expose functions
Add unit tests

Are there any user-facing changes?

Addition only

…tches

Add read_arrow, read_empty, register_arrow, and register_batch methods to
SessionContext, exposing upstream DataFusion v53 functionality. The write_*
methods and read_batch/read_batches are already covered by DataFrame.write_*
and SessionContext.from_arrow respectively. Closes apache#1458.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to expose additional upstream DataFusion SessionContext APIs in datafusion-python and add Python unit tests to validate the new bindings.

Changes:

  • Added SessionContext.register_batch() and SessionContext.register_arrow() bindings.
  • Added SessionContext.read_arrow() and SessionContext.read_empty() bindings.
  • Added unit tests covering Arrow IPC read/registration and RecordBatch registration.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
crates/core/src/context.rs Adds PyO3 bindings for Arrow IPC read/register, batch registration, and an empty DataFrame read method.
python/datafusion/context.py Exposes the new bindings on the public Python SessionContext wrapper.
python/tests/test_context.py Adds tests for read_arrow, read_empty, register_arrow, and register_batch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

timsaucer and others added 3 commits April 5, 2026 07:41
…lias for empty_table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@timsaucer timsaucer marked this pull request as ready for review April 5, 2026 11:48
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@timsaucer timsaucer force-pushed the feat/add-missing-registration-methods branch from d7555e7 to 03092ed Compare April 5, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add missing SessionContext read/write and registration methods

2 participants