Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix test
  • Loading branch information
cloud-fan committed Sep 5, 2019
commit a19943f4b1df437f4725f968853b21962be126e0
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ class CatalogManager(conf: SQLConf, sessionCatalog: TableCatalog) extends Loggin
private val catalogs = mutable.HashMap.empty[String, CatalogPlugin]

def catalog(name: String): CatalogPlugin = synchronized {
catalogs.getOrElseUpdate(name, Catalogs.load(name, conf))
if (name.equalsIgnoreCase(CatalogManager.SESSION_CATALOG_NAME)) {
v2SessionCatalog.getOrElse {
throw new IllegalStateException("v2 session catalog not available")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not sessionCatalog?

}
} else {
catalogs.getOrElseUpdate(name, Catalogs.load(name, conf))
}
}

def defaultCatalog: Option[CatalogPlugin] = {
Expand Down