Skip to content

Commit 3c0f368

Browse files
committed
Fixes test failure
1 parent 8d06b98 commit 3c0f368

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -898,18 +898,6 @@ class HiveQuerySuite extends HiveComparisonTest with BeforeAndAfter {
898898
sql("DROP TABLE t1")
899899
}
900900

901-
test("CREATE TEMPORARY FUNCTION") {
902-
val funcJar = TestHive.getHiveFile("TestUDTF.jar").getCanonicalPath
903-
val jarURL = s"file://$funcJar"
904-
sql(s"ADD JAR $jarURL")
905-
sql(
906-
"""CREATE TEMPORARY FUNCTION udtf_count2 AS
907-
|'org.apache.spark.sql.hive.execution.GenericUDTFCount2'
908-
""".stripMargin)
909-
assert(sql("DESCRIBE FUNCTION udtf_count2").count > 1)
910-
sql("DROP TEMPORARY FUNCTION udtf_count2")
911-
}
912-
913901
test("ADD FILE command") {
914902
val testFile = TestHive.getHiveFile("data/files/v1.txt").getCanonicalFile
915903
sql(s"ADD FILE $testFile")

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@ class SQLQuerySuite extends QueryTest with SQLTestUtils {
7070
private val sqlContext = _sqlContext
7171

7272
test("UDTF") {
73-
sql(s"ADD JAR ${TestHive.getHiveFile("TestUDTF.jar").getCanonicalPath()}")
73+
val jarPath = TestHive.getHiveFile("TestUDTF.jar").getCanonicalPath
74+
75+
// SPARK-11595 Fixes ADD JAR when input path contains URL scheme
76+
val jarURL = s"file://$jarPath"
77+
78+
sql(s"ADD JAR $jarURL")
7479
// The function source code can be found at:
7580
// https://cwiki.apache.org/confluence/display/Hive/DeveloperGuide+UDTF
7681
sql(

0 commit comments

Comments
 (0)