cloud-fan commented on a change in pull request #25104: [SPARK-28341][SQL] create a public API for V2SessionCatalog URL: https://github.com/apache/spark/pull/25104#discussion_r321081727
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalog/v2/CatalogManager.scala ########## @@ -27,12 +27,16 @@ import org.apache.spark.sql.internal.SQLConf * A thread-safe manager for [[CatalogPlugin]]s. It tracks all the registered catalogs, and allow * the caller to look up a catalog by name. */ -class CatalogManager(conf: SQLConf) extends Logging { +class CatalogManager(conf: SQLConf, defaultSessionCatalog: TableCatalog) extends Logging { Review comment: @brkyvz I agree with you that the logic was a bit confusing, so I refine it a little bit: 1. when the `V2_SESSION_CATALOG` is not set, return the default session catalog `V2SessionCatalog`. 2. when the `V2_SESSION_CATALOG` is set, try to instantiate it, and return the default session catalog if we hit problems during instantiating. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org