cloud-fan commented on a change in pull request #25368: [SPARK-28635][SQL] 
create CatalogManager to track registered v2 catalogs
URL: https://github.com/apache/spark/pull/25368#discussion_r311670997
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ##########
 @@ -109,10 +109,7 @@ class Analyzer(
     this(catalog, conf, conf.optimizerMaxIterations)
   }
 
-  override protected def defaultCatalogName: Option[String] = 
conf.defaultV2Catalog
-
-  override protected def lookupCatalog(name: String): CatalogPlugin =
-    throw new CatalogNotFoundException("No catalog lookup function")
+  override val catalogManager: CatalogManager = new CatalogManager(conf)
 
 Review comment:
   > Let's put CatalogManager in SessionState and pass it into the analyzer
   
   This is not doable. The analyzer is created in `BaseSessionStateBuilder`. So 
there are 2 options:
   1. create the `CatalogManager` in `BaseSessionStateBuilder`, and pass it to 
the analyzer.
   2. create the `CatalogManager` in the analyzer, and put an accessor of it in 
`SessionState`.
   
   I think 2 is better.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to