feat(python): integrate Ballista through DataFusion FFI - #2252
Draft
timsaucer wants to merge 4 commits into
Draft
Conversation
AI Disclosure: This code was written in part by an AI agent.
AI Disclosure: This code was written in part by an AI agent.
AI Disclosure: This code was written in part by an AI agent.:
milenkovicm
reviewed
Aug 7, 2026
milenkovicm
left a comment
Contributor
There was a problem hiding this comment.
After many years! Thanks @timsaucer awesome as always!
| "address = f\"df://{host}:{port}\"\n", | ||
| "\n", | ||
| "ballista_config = ballista_datafusion_config_defaults()\n", | ||
| "ctx = SessionContext(SessionConfig(ballista_config)).with_extensions(\n", |
Contributor
There was a problem hiding this comment.
Can we use ballista context to hide next few lines and simplify session context creation ?
| ] | ||
|
|
||
|
|
||
| class RedefiningDataFrameMeta(type): |
Contributor
There was a problem hiding this comment.
Can we remove this once we get FFI planner ?
| session_id = args[0].session_id | ||
| df = func(*args, **kwargs) | ||
| return DistributedDataFrame(df, session_id, address) | ||
| return DistributedDataFrame( |
Contributor
There was a problem hiding this comment.
DistributedDataFrame, should be removed with FFI, should it ?
| name: &str, | ||
| buf: &[u8], | ||
| ) -> Result<Arc<datafusion::logical_expr::ScalarUDF>> { | ||
| self.default_codec.try_decode_udf(name, buf) |
Contributor
There was a problem hiding this comment.
Do we need to do something extra to get python udf serde?
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.
Summary
BallistaExtensionbundle that installs its components atomically withSessionContext.with_extensionsTesting
cargo checkcargo fmt -- --checkuv run pytest python/tests/test_context.py -q(21 passed)