cloud-fan commented on a change in pull request #28868:
URL: https://github.com/apache/spark/pull/28868#discussion_r448993408



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala
##########
@@ -1020,7 +1020,9 @@ object SparkSession extends Logging {
       // Return None when running on executors.
       None
     } else {
-      Option(activeThreadSession.get)
+      val session = Option(activeThreadSession.get)
+      session.foreach(_.sparkContext.assertNotStopped())

Review comment:
       I don't think it's necessary. A user may get the active session 
instance, and after that someone else stops the spark context. This check can't 
help this case.




----------------------------------------------------------------
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]



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

Reply via email to