Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22295#discussion_r221104383
  
    --- Diff: python/pyspark/sql/session.py ---
    @@ -231,6 +231,7 @@ def __init__(self, sparkContext, jsparkSession=None):
                     or SparkSession._instantiatedSession._sc._jsc is None:
                 SparkSession._instantiatedSession = self
                 self._jvm.SparkSession.setDefaultSession(self._jsparkSession)
    +            self._jvm.SparkSession.setActiveSession(self._jsparkSession)
    --- End diff --
    
    > When createDataFrame, we already have a session
    
    but wouldn't we not set the active session properly if session A sets an 
active session in `__init__`, and then session B sets an active session in 
`__init__`, and then session A calls `createDataFrame` ?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to