xupefei commented on code in PR #48120:
URL: https://github.com/apache/spark/pull/48120#discussion_r1820966982
##########
sql/core/src/main/scala/org/apache/spark/sql/artifact/ArtifactManager.scala:
##########
@@ -258,9 +315,10 @@ class ArtifactManager(session: SparkSession) extends
Logging {
* Returns a [[ClassLoader]] for session-specific jar/class file resources.
*/
def classloader: ClassLoader = {
- val urls = getAddedJars :+ classDir.toUri.toURL
+ val urls = (getAddedJars :+ classDir.toUri.toURL).toArray
val prefixes = SparkEnv.get.conf.get(CONNECT_SCALA_UDF_STUB_PREFIXES)
val userClasspathFirst =
SparkEnv.get.conf.get(EXECUTOR_USER_CLASS_PATH_FIRST)
+ val fallbackClassLoader = session.sharedState.jarClassLoader
Review Comment:
This classloader is used only in Hive to hold all `ADD JAR`s.
This classloader will be set to default once there's one ADD JAR:
https://github.com/apache/spark/blob/6a36c43604a638f603a3a40c22ee1e6bd3ae8d7e/sql/core/src/main/scala/org/apache/spark/sql/internal/SessionState.scala#L181-L188
--
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]