wangyum commented on a change in pull request #25542: [SPARK-28840][SQL] 
conf.getClassLoader in SparkSQLCLIDriver should be avoided as it returns the 
UDFClassLoader which is created by Hive
URL: https://github.com/apache/spark/pull/25542#discussion_r322083685
 
 

 ##########
 File path: 
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala
 ##########
 @@ -305,4 +305,30 @@ class CliSuite extends SparkFunSuite with 
BeforeAndAfterAll with Logging {
       "SELECT example_max(1);" -> "1"
     )
   }
+
+  test("SPARK-28840 test --jars command") {
+    val jarFile = new 
File("../../sql/hive/src/test/resources/SPARK-21101-1.0.jar").getCanonicalPath
+    runCliWithin(
+      1.minute,
+      Seq("--jars", s"$jarFile"))(
+      "CREATE TEMPORARY FUNCTION testjar AS" +
+        " 'org.apache.spark.sql.hive.execution.UDTFStack';" -> "",
+      "SELECT testjar(1,'TEST-SPARK-TEST-jar', 28840);" -> 
"TEST-SPARK-TEST-jar\t28840"
+    )
+  }
+
+  test("SPARK-28840 test --jars and hive.aux.jars.path command") {
+    val jarFile = new 
File("../../sql/hive/src/test/resources/SPARK-21101-1.0.jar").getCanonicalPath
+    val hiveContribJar = HiveTestUtils.getHiveContribJar.getCanonicalPath
 
 Review comment:
   `hiveContribJar` already in classpath. We need to wait for this PR: 
https://github.com/apache/spark/pull/25690

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


With regards,
Apache Git Services

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

Reply via email to