docs: add contributor-guide page for python client design#1588
Draft
andygrove wants to merge 1 commit intoapache:mainfrom
Draft
docs: add contributor-guide page for python client design#1588andygrove wants to merge 1 commit intoapache:mainfrom
andygrove wants to merge 1 commit intoapache:mainfrom
Conversation
Document how the python wheel layers on top of datafusion-python via metaclass interception and a logical-plan-shipping bridge, and explain why the README's known limitations follow from that design. Fix the broken python/src/context.rs link in code-organization.md and add the new page to the contributors-guide toctree.
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 #.
Rationale for this change
The contributor guide currently has only a single bullet about the Python bindings under
code-organization.md, and it links topython/src/context.rs— a file that no longer exists (the current files arelib.rs,cluster.rs, andutils.rs). There is no contributor-facing explanation of how the wheel actually works, even though the design is non-obvious: the Python package depends ondatafusion-python, interceptsSessionContextvia a metaclass to return aDistributedDataFrame, and only crosses into Ballista at execution time by serializing the locally-built logical plan and shipping it to a freshSessionContext::remote_with_state. The known limitations listed inpython/README.mdare direct consequences of that design but the connection isn't documented anywhere.What changes are included in this PR?
docs/source/contributors-guide/python-client.mddescribing the crate/package layout, the metaclass + bridge mechanism, the cluster lifecycle helpers (BallistaScheduler,BallistaExecutor,setup_test_cluster), and how each documented limitation maps back to a specific piece of the design. Cross-links toarchitecture.mdand the relevant tracking issues (Ballista Python Issue(s) #1142, Add support for Python UDFs in distributed queries #173).python/src/context.rslink incode-organization.mdand pointed the PyBallista section at the files that exist today, plus the new design page.docs/source/index.rst.This PR only touches contributor guide content — the user guide is being improved separately.
Are there any user-facing changes?
No code changes; documentation only.