sunchao commented on a change in pull request #33339:
URL: https://github.com/apache/spark/pull/33339#discussion_r698742769
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogManager.scala
##########
@@ -46,6 +47,7 @@ class CatalogManager(
private val catalogs = mutable.HashMap.empty[String, CatalogPlugin]
def catalog(name: String): CatalogPlugin = synchronized {
+ validateName(name)
Review comment:
Instead of reusing `invalidDatabaseObjectNameError` (not sure if catalog
should be considered as database object), should we have another exception such
as `InvalidCatalogNameException` and throw it in `Catalogs.load`? we can also
give more informative error message such as: "The catalog entry is defined and
mapped to XXX but the catalog name is of invalid format" etc.
--
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]