imback82 commented on a change in pull request #26562: [SPARK-29859][SQL]ALTER 
DATABASE (SET LOCATION) should look up catalog like v2 commands
URL: https://github.com/apache/spark/pull/26562#discussion_r347148919
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveCatalogs.scala
 ##########
 @@ -96,6 +96,9 @@ class ResolveCatalogs(val catalogManager: CatalogManager)
     case AlterNamespaceSetPropertiesStatement(NonSessionCatalog(catalog, 
nameParts), properties) =>
       AlterNamespaceSetProperties(catalog, nameParts, properties)
 
 Review comment:
   Can you do `catalog.asNamespaceCatalog` so that it fails earlier if 
`catalog` doesn't support namespaces? The logical plan also needs to be updated 
to take a catalog of `SupportsNamespaces` instead of `CatalogPlugin`. Check 
`CreateNamespace` below. The reason why `DropNamespace` takes `CatalogPlugin` 
is that it needs to use both `TableCatalog` and `SupportsNamespaces`.

----------------------------------------------------------------
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