Add missing deregister methods to SessionContext#1473
Open
timsaucer wants to merge 4 commits intoapache:mainfrom
Open
Add missing deregister methods to SessionContext#1473timsaucer wants to merge 4 commits intoapache:mainfrom
timsaucer wants to merge 4 commits intoapache:mainfrom
Conversation
Expose upstream DataFusion deregister methods (deregister_udf, deregister_udaf, deregister_udwf, deregister_udtf, deregister_object_store) in both the Rust PyO3 bindings and Python wrappers, closing the gap identified in apache#1457. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Exposes additional SessionContext deregistration APIs in the Python bindings to match upstream DataFusion capabilities, and adds tests for UDF/UDAF/UDWF/UDTF deregistration.
Changes:
- Add Python
SessionContextwrappers forderegister_object_store,deregister_udf,deregister_udaf,deregister_udwf, andderegister_udtf. - Add corresponding Rust
PySessionContextbindings for the missing deregister methods. - Add Python unit tests verifying UDF/UDAF/UDWF/UDTF deregistration behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
python/datafusion/context.py |
Adds new public Python API methods on SessionContext to deregister object stores and user-defined functions. |
crates/core/src/context.rs |
Adds PyO3-exposed Rust bindings that call through to DataFusion SessionContext/RuntimeEnv deregistration methods. |
python/tests/test_context.py |
Adds tests covering deregistration of scalar UDFs, aggregate UDAFs, window UDWFs, and table UDTFs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DataFusion raises ValueError for planning errors when a deregistered function is used in a query. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Url::parse() can fail on invalid input. Use .map_err() to convert the error into a Python exception instead of panicking. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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 #1457
Rationale for this change
These methods exist in the upstream repository but were not exposed to the Python API.
What changes are included in this PR?
Expose methods to python
Add unit tests
Are there any user-facing changes?
Addition only