imback82 commented on a change in pull request #26006: [SPARK-29279][SQL] Merge
SHOW NAMESPACES and SHOW DATABASES code path
URL: https://github.com/apache/spark/pull/26006#discussion_r331732251
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveCatalogs.scala
##########
@@ -185,8 +183,7 @@ class ResolveCatalogs(val catalogManager: CatalogManager)
SetCatalogAndNamespace(catalogManager, None, Some(nameParts))
} else {
val CurrentCatalogAndNamespace(catalog, namespace) = nameParts
- val ns = if (namespace.isEmpty) { None } else { Some(namespace) }
- SetCatalogAndNamespace(catalogManager, Some(catalog.name()), ns)
+ SetCatalogAndNamespace(catalogManager, Some(catalog.name()), namespace)
Review comment:
The check is done here:
https://github.com/apache/spark/blob/8556710409d9f2fbaee9dbf76a2ea70218316693/sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogManager.scala#L128-L137
----------------------------------------------------------------
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]