afavaro commented on a change in pull request #27610:
[SPARK-30856][SQL][PySpark] Fix SQLContext.getOrCreate() when SparkContext is
restarted
URL: https://github.com/apache/spark/pull/27610#discussion_r381167953
##########
File path: python/pyspark/sql/session.py
##########
@@ -699,12 +699,14 @@ def streams(self):
def stop(self):
"""Stop the underlying :class:`SparkContext`.
"""
+ from pyspark.sql.context import SQLContext
self._sc.stop()
# We should clean the default session up. See SPARK-23228.
self._jvm.SparkSession.clearDefaultSession()
self._jvm.SparkSession.clearActiveSession()
SparkSession._instantiatedSession = None
SparkSession._activeSession = None
+ SQLContext._instantiatedContext = None
Review comment:
Done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]