xupefei commented on code in PR #48120:
URL: https://github.com/apache/spark/pull/48120#discussion_r1831056745


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala:
##########
@@ -2141,7 +2141,9 @@ abstract class DDLSuite extends QueryTest with 
DDLSuiteBase {
       root = Utils.createTempDir().getCanonicalPath, namePrefix = 
"addDirectory")
     val testFile = File.createTempFile("testFile", "1", directoryToAdd)
     spark.sql(s"ADD FILE $directoryToAdd")
-    assert(new 
File(SparkFiles.get(s"${directoryToAdd.getName}/${testFile.getName}")).exists())
+    spark.artifactManager.withResources {

Review Comment:
   Now it's hacky: The JAR will be added to SparkContect with a session UUID 
prefix but will be accessible by all sessions (due to we wrapped it's 
classloader).
   
   On a second thought, I could make it cleaner by passing `default` as UUID 
into the `sparkContext.addJar` method to explicitly disable isolation.



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

Reply via email to