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_r311340656
##########
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:
Because it's only needed by the analyzer.
Alternatively, we can put `CatalogManager` in `BaseSessionStateBuilder`, and
pass it to analyzer when we create analyzer in `BaseSessionStateBuilder`.
Technically, it's already in `SessionState` because `SessionState` holds the
analyzer.
----------------------------------------------------------------
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]