{{ message }}
Repository navigation
Add Spark Connect compatibility guards - #501
Draft
zhengruifeng wants to merge 2 commits into
Draft
zhengruifeng wants to merge 2 commits into
zhengruifeng wants to merge 2 commits into
Conversation
zhengruifeng
requested review from
renardeinside
and removed request for
a team
August 19, 2026 01:01
zhengruifeng
marked this pull request as draft
August 19, 2026 07:34
ghanse
reviewed
Aug 19, 2026
ghanse
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for your contribution, I left a few small comments.
Comment on lines
+56
to
+58
| active_session = cls.getActiveSession() | ||
| if active_session is not None: | ||
| return active_session |
Collaborator
There was a problem hiding this comment.
Can we getInstance here to avoid duplication?
|
|
||
| def _get_pyspark_is_remote() -> Callable[[], bool] | None: | ||
| """Returns PySpark's public remote-session predicate when available.""" | ||
| for import_path in ("pyspark.sql.utils", "pyspark.sql"): |
Collaborator
There was a problem hiding this comment.
Maybe add a small comment about why we use these modules to test if PySpark is remote?
Comment on lines
+45
to
+47
Collaborator
There was a problem hiding this comment.
Could we simplify this to only test for isinstance(sparkSession, "pyspark.sql.connect.session.SparkSession")? Or are there some edge cases?
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.

Changes
Linked issues
Related to #255.
Requirements
Tests run: