Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import scala.concurrent.Promise
import scala.concurrent.duration._

import org.apache.hadoop.hive.conf.HiveConf.ConfVars
import org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleMax
import org.scalatest.BeforeAndAfterAll

import org.apache.spark.SparkFunSuite
Expand Down Expand Up @@ -290,8 +291,18 @@ class CliSuite extends SparkFunSuite with BeforeAndAfterAll with Logging {
val tmpDir = Utils.createTempDir(namePrefix = "SPARK-21451")
runCliWithin(
1.minute,
Seq(s"--conf", s"spark.hadoop.${ConfVars.METASTOREWAREHOUSE}=$tmpDir"))(
Seq("--conf", s"spark.hadoop.${ConfVars.METASTOREWAREHOUSE}=$tmpDir"))(
"set spark.sql.warehouse.dir;" -> tmpDir.getAbsolutePath)
tmpDir.delete()
}

test("Support hive.aux.jars.path") {
val hiveContribJar = HiveTestUtils.getHiveContribJar.getCanonicalPath
runCliWithin(
1.minute,
Seq("--conf", s"spark.hadoop.${ConfVars.HIVEAUXJARS}=$hiveContribJar"))(
s"CREATE TEMPORARY FUNCTION example_max AS '${classOf[UDAFExampleMax].getName}';" -> "",
"SELECT example_max(1);" -> "1"
)
}
}