Skip to content
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

[SPARK-47986][CONNECT][PYTHON] Unable to create a new session when the default session is closed by the server #46435

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adjust
  • Loading branch information
nija-at committed May 9, 2024
commit bf2f422499689711f30abb13dae38c5b2557207c
8 changes: 4 additions & 4 deletions python/pyspark/sql/connect/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,15 @@ def _set_default_and_active_session(cls, session: "SparkSession") -> None:
cls._active_session.session = session

@classmethod
def getActiveSession(cls) -> Optional["SparkSession"]:
s = getattr(cls._active_session, "session", None)
def _getDefaultSession(cls) -> Optional["SparkSession"]:
s = cls._default_session
if s is not None and not s.is_stopped:
return s
return None

@classmethod
def _getDefaultSession(cls) -> Optional["SparkSession"]:
s = cls._default_session
def getActiveSession(cls) -> Optional["SparkSession"]:
s = getattr(cls._active_session, "session", None)
if s is not None and not s.is_stopped:
return s
return None
Expand Down