Open
Conversation
…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>
Contributor
There was a problem hiding this comment.
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()andSessionContext.register_arrow()bindings. - Added
SessionContext.read_arrow()andSessionContext.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.
…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>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d7555e7 to
03092ed
Compare
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?
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