wangyum commented on code in PR #36786:
URL: https://github.com/apache/spark/pull/36786#discussion_r892493780
##########
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala:
##########
@@ -140,7 +143,10 @@ private[hive] object SparkSQLCLIDriver extends Logging {
SessionState.setCurrentSessionState(sessionState)
// Clean up after we exit
- ShutdownHookManager.addShutdownHook { () => SparkSQLEnv.stop() }
+ ShutdownHookManager.addShutdownHook { () =>
+ sessionState.close()
+ SparkSQLEnv.stop()
Review Comment:
```scala
try {
sessionState.close()
} finally {
SparkSQLEnv.stop()
}
```
?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]