yaooqinn commented on a change in pull request #27933: [SPARK-31170][SQL] Spark
SQL Cli should respect hive-site.xml and spark.sql.warehouse.dir
URL: https://github.com/apache/spark/pull/27933#discussion_r393518456
##########
File path:
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala
##########
@@ -159,6 +160,17 @@ class CliSuite extends SparkFunSuite with
BeforeAndAfterAll with Logging {
}
}
+ test("Pick spark.sql.warehouse.dir first for Spark Cli if set") {
+ val sparkWareHouseDir = Utils.createTempDir()
+ new File(warehousePath, "metastore_db").delete()
+ runCliWithin(
+ 1.minute,
+ Seq("--conf",
s"""${StaticSQLConf.WAREHOUSE_PATH.key}=$sparkWareHouseDir"""))(
+ """desc database default;""" -> sparkWareHouseDir.getAbsolutePath
+ )
+ sparkWareHouseDir.delete()
Review comment:
the hive.xxx.xxx.dir is from the global variable `warehousePath`, if the
`sparkWareHouseDir` not picked, the db location of default will be the hive one
----------------------------------------------------------------
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]