Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/17001#discussion_r103420821 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalog.scala --- @@ -74,7 +77,19 @@ abstract class ExternalCatalog { */ def alterDatabase(dbDefinition: CatalogDatabase): Unit - def getDatabase(db: String): CatalogDatabase + def getDatabase(db: String): CatalogDatabase = { + val database = getDatabaseInternal(db) + // The default database's location always uses the warehouse path. + // Since the location of database stored in metastore is qualified, + // we also make the warehouse location qualified. + if (db == SessionCatalog.DEFAULT_DATABASE) { --- End diff -- can we totally make default database a virtual concept? i.e. we never create it or ask metastore to retrieve it, just keep an instance of `CatalogDatabase` for default database, and return it in `ExternalCatalog.getDatabase`
--- 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