wangyum commented on a change in pull request #32410:
URL: https://github.com/apache/spark/pull/32410#discussion_r648265495



##########
File path: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
##########
@@ -190,7 +190,7 @@ private[hive] class HiveClientImpl(
     // For this reason we cannot load the jars added by ADDJarsCommand because 
of class loader
     // got changed. We reset it to clientLoader.ClassLoader here.
     state.getConf.setClassLoader(clientLoader.classLoader)
-    SessionState.start(state)
+    shim.setCurrentSessionState(state)

Review comment:
       Sorry for late replay. It is two questions.
   
   > if this is a safe change
   
   Yes. The difference is `sessionState.start` creating too many directories 
and Spark SQL do not need it.
   
   > why do you think this is making it simpler?
   
   `shim.setCurrentSessionState(state)` is simpler than `if (version != 
hive.v12) SessionState.setCurrentSessionState(state) else   
SessionState.start(state) `.




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