dongjoon-hyun commented on code in PR #37287:
URL: https://github.com/apache/spark/pull/37287#discussion_r929856580
##########
sql/core/src/main/scala/org/apache/spark/sql/internal/CatalogImpl.scala:
##########
@@ -361,41 +308,44 @@ class CatalogImpl(sparkSession: SparkSession) extends
Catalog {
CatalogImpl.makeDataset(columns, sparkSession)
}
+ private def getNamespace(catalog: CatalogPlugin, ns: Seq[String]): Database
= catalog match {
+ case catalog: SupportsNamespaces =>
+ val metadata = catalog.loadNamespaceMetadata(ns.toArray)
+ new Database(
+ name = ns.quoted,
+ catalog = catalog.name,
+ description = metadata.get(SupportsNamespaces.PROP_COMMENT),
+ locationUri = metadata.get(SupportsNamespaces.PROP_LOCATION))
+ // If the catalog doesn't support namespaces, we assume it's an implicit
namespace, which always
+ // exists but has no metadata.
+ case ResolvedNamespace(catalog: CatalogPlugin, namespace) =>
Review Comment:
This seems to cause a compilation failure during this transition.
```
[error]
/home/runner/work/spark/spark/sql/core/src/main/scala/org/apache/spark/sql/internal/CatalogImpl.scala:321:10:
constructor cannot be instantiated to expected type;
[error] found : org.apache.spark.sql.catalyst.analysis.ResolvedNamespace
[error] required: org.apache.spark.sql.connector.catalog.CatalogPlugin
[error] case ResolvedNamespace(catalog: CatalogPlugin, namespace) =>
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]