File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -898,18 +898,6 @@ class HiveQuerySuite extends HiveComparisonTest with BeforeAndAfter {
898
898
sql(" DROP TABLE t1" )
899
899
}
900
900
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
-
913
901
test(" ADD FILE command" ) {
914
902
val testFile = TestHive .getHiveFile(" data/files/v1.txt" ).getCanonicalFile
915
903
sql(s " ADD FILE $testFile" )
Original file line number Diff line number Diff line change @@ -70,7 +70,12 @@ class SQLQuerySuite extends QueryTest with SQLTestUtils {
70
70
private val sqlContext = _sqlContext
71
71
72
72
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" )
74
79
// The function source code can be found at:
75
80
// https://cwiki.apache.org/confluence/display/Hive/DeveloperGuide+UDTF
76
81
sql(
You can’t perform that action at this time.
0 commit comments