-
Notifications
You must be signed in to change notification settings - Fork 134
feat/making global context accessible for users #1060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
timsaucer
merged 15 commits into
apache:main
from
jsai28:feat-making-global-context-accessible-for-users
Mar 13, 2025
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
72a6b5f
Rename _global_ctx to global_ctx
jsai28 b7fea47
Add global context to python wrapper code
jsai28 597ef33
Update context.py
jsai28 3751cf5
singleton for global context
jsai28 14ee8b3
formatting
jsai28 9e90b81
remove udf from import
jsai28 a9c5b35
Merge branch 'feat-making-global-context-accessible-for-users' of htt…
jsai28 f716fb8
remove _global_instance
jsai28 b2bbf33
formatting
jsai28 8534f51
formatting
jsai28 ae9b6a2
unnecessary test
jsai28 069c4a3
fix test_io.py
jsai28 d124275
ran ruff
jsai28 5433f01
Merge branch 'main' into feat-making-global-context-accessible-for-users
jsai28 2baf728
ran ruff format
jsai28 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you have it here where you moved the single entry over to the python side, this method goes unused. I would recommend you leave this line as is, but up in the python code you call this method instead of creating
_global_instanceThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your comments, just to summarize whats needed here:
_global_ctx->global_ctx), which I've currently done.SessionContextclass) which calls the above function and wraps it inSessionContextso that users can still use the other associated methods in this class, but with the global context. This should be a class method so that users dont have to instantiateSessionContextfirst.read_*functions (read_parquet, etc) should use the global context from this python wrapper instead of using the one from the internal implementation.Am I interpreting this correctly? Sorry if I'm overthinking this 😅. I've updated the PR, currently the
test_read_csvandtest_read_csv_listtests fail so I'm looking into that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this description looks correct.