Repository navigation
Conversation
This branch has not been deployed
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.
What changes were proposed in this pull request?
Add
DataFrame.__dir__and_ipython_key_completions_in the PyO3 binding, matching Python Connect.dir(df)returns sorted, deduplicated class attributes plus all column names. Key completion returns column names in schema order, including duplicates and non-identifiers. Both methods propagate schema errors and release the GIL during analysis. Class inspection avoids recursive instancedircalls.Why are the changes needed?
For a DataFrame with column
c0, master omitsc0fromdir(df)and raisesAttributeErrorfor_ipython_key_completions_(). This prevents interactive column discovery and bracket completion.SPARK-60681
Does this PR introduce any user-facing change?
Yes. Interactive completion includes DataFrame columns while preserving existing methods. This is based directly on master and is independent of schema caching in #120: each completion call still performs schema analysis.
How was this patch tested?
python/tests/test_dropin_offline.py; no workflow edit is required. Focused invocation:python -m pytest python/tests/test_dropin_offline.py -k test_completion -q.wasm-udffeatures; formatting and diff checks pass. Workspace-wide compilation requires an unavailablewasm32-unknown-unknowntarget for examples, so that initial failure is retained locally.PYTHONPATHto the installed package followed by the repository Python root, matching the existing CI module layout.No live Spark server or JVM was used. Original setup failures, raw measurements, commands, source/wheel hashes and dependency freezes are retained in campaign artifacts.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex (GPT-6)