ulysses-you commented on a change in pull request #28868:
URL: https://github.com/apache/spark/pull/28868#discussion_r449006134
##########
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:
That's true. This place only checks if user get an active session,
existing used session can not be covered. But in some case which used
`session.withActive()` this can do the help.
----------------------------------------------------------------
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]