Skip to content

Commit 7eb12dd

Browse files
committed
inline vars
1 parent 62e1be0 commit 7eb12dd

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

  • extensions/spark/kyuubi-spark-connector-hive/src/main/scala/org/apache/kyuubi/spark/connector/hive

extensions/spark/kyuubi-spark-connector-hive/src/main/scala/org/apache/kyuubi/spark/connector/hive/HiveTableCatalog.scala

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -499,14 +499,11 @@ class HiveTableCatalog(sparkSession: SparkSession)
499499
* @return qualified URI path for the database
500500
*/
501501
private def getCatalogDefaultDBPath(db: String): URI = {
502-
val defaultLocation = catalog.getDefaultDBPath(db)
503-
val catalogWarehouseDir = catalogOptions.get("hive.metastore.warehouse.dir")
504-
505-
Option(catalogWarehouseDir).filter(_.nonEmpty) match {
502+
Option(catalogOptions.get("hive.metastore.warehouse.dir")).filter(_.nonEmpty) match {
506503
case Some(dir) =>
507-
CatalogUtils.makeQualifiedDBObjectPath(defaultLocation, dir, hadoopConf)
504+
CatalogUtils.makeQualifiedDBObjectPath(catalog.getDefaultDBPath(db), dir, hadoopConf)
508505
case None =>
509-
defaultLocation
506+
catalog.getDefaultDBPath(db)
510507
}
511508
}
512509

0 commit comments

Comments
 (0)