Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/8909#discussion_r71047738
--- Diff:
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
@@ -598,6 +631,14 @@ class HiveContext(sc: SparkContext) extends
SQLContext(sc) with Logging {
case _ => super.simpleString
}
}
+
+ protected[sql] override def addJar(path: String): Unit = {
+ // Add jar to Hive and classloader
+ executionHive.addJar(path)
+ metadataHive.addJar(path)
+
Thread.currentThread().setContextClassLoader(executionHive.clientLoader.classLoader)
--- End diff --
@davies @yhuai Do we need to restore the original classloader after calling
`super.addJar()` or is it intentional that calling `HiveContext.addJar` will
permanently mutate the calling thread's context classloader?
---
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]