Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19068#discussion_r138543230
--- Diff:
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
---
@@ -132,43 +134,26 @@ private[hive] class HiveClientImpl(
// in hive jars, which will turn off isolation, if
SessionSate.detachSession is
// called to remove the current state after that, hive client
created later will initialize
// its own state by newState()
- Option(SessionState.get).getOrElse(newState())
+ val ret = SessionState.get
+ if (ret != null) {
+
Option(hadoopConf.get(ConfVars.METASTOREWAREHOUSE.varname)).foreach { dir =>
--- End diff --
can you add some comments to explain this logic?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]