cloud-fan commented on a change in pull request #26741: [SPARK-30104][SQL] Fix
catalog resolution for 'global_temp'
URL: https://github.com/apache/spark/pull/26741#discussion_r355280785
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/LookupCatalog.scala
##########
@@ -133,7 +133,11 @@ private[sql] trait LookupCatalog extends Logging {
// For example, if the name of a custom catalog is the same with
`GLOBAL_TEMP_DATABASE`,
// this custom catalog can't be accessed.
if (nameParts.head.equalsIgnoreCase(globalTempDB)) {
Review comment:
ah you are right. For a single-part name like `abc`, it may mean a table
`abc` under default catalog, or mean catalog `abc`.
I think it's better know if it's allowed to return a single catalog. e.g.
it's allowed in `SHOW TABLES`, but not `DESCRIBE TABLE`.
Shall we separate `CatalogAndIdentifierParts` into `CatalogAndTable`,
`CatalogAndNamespace`? For `CatalogAndTable`, it's not allowed to return empty
array as table name, so we shouldn't resolve single-part name to a catalog. For
`CatalogAndNamespace`, root namespace's name is an empty array, so it's allowed.
----------------------------------------------------------------
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]