Github user yhuai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9171#discussion_r42456720
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/commands.scala ---
    @@ -100,7 +99,7 @@ case class AddJar(path: String) extends RunnableCommand {
         // returns the value of a thread local variable and its HiveConf may 
not be the HiveConf
         // associated with `executionHive.state` (for example, HiveContext is 
created in one thread
         // and then add jar is called from another thread).
    -    hiveContext.executionHive.state.getConf.setClassLoader(newClassLoader)
    +    
hiveContext.executionHive.state.getConf.setClassLoader(hiveContext.libraryClassLoader)
    --- End diff --
    
    I think that this pr also suffers the same problem exposed in 
https://github.com/apache/spark/pull/9170. There was no test failure because we 
only set the mutable classloader when we actually do add jar (In #9170 we set 
the mutable classloader to `executionHive.state.getConf` whenever we need to 
use `withHiveState`).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to