Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12081#discussion_r59158513
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala ---
    @@ -74,9 +74,9 @@ private[sql] class HiveSessionCatalog(
       // | Methods and fields for interacting with HiveMetastoreCatalog |
       // ----------------------------------------------------------------
     
    -  override def getDefaultDBPath(db: String): String = {
    -    val defaultPath = 
context.hiveconf.getVar(HiveConf.ConfVars.METASTOREWAREHOUSE)
    -    new Path(new Path(defaultPath), db + ".db").toString
    +  override def getDatabasePath(dbName: String, path: Option[String] = 
None): String = {
    +    val dbPath = 
path.getOrElse(context.hiveconf.getVar(HiveConf.ConfVars.METASTOREWAREHOUSE))
    +    new Path(new Path(dbPath), dbName.toLowerCase() + ".db").toString
    --- End diff --
    
    Just checked the code in [hive metastore 
warehouse.java](https://github.com/apache/hive/blob/master/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java#L168-L172).
 It is much more complex than what I thought. I will try to follow what it does 
and rewrite this function.
    
    CC @yhuai @andrewor14 Let me know if you think that is not necessary. 
Thanks!
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to