imback82 commented on a change in pull request #26853:
[SPARK-30104][SQL][FOLLOWUP] V2 catalog named 'global_temp' should always be
masked
URL: https://github.com/apache/spark/pull/26853#discussion_r356858697
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/LookupCatalog.scala
##########
@@ -117,7 +104,7 @@ private[sql] trait LookupCatalog extends Logging {
assert(nameParts.nonEmpty)
if (nameParts.length == 1) {
Some((currentCatalog, Identifier.of(Array(), nameParts.head)))
- } else if (nameParts.length == 2 &&
nameParts.head.equalsIgnoreCase(globalTempDB)) {
+ } else if (nameParts.head.equalsIgnoreCase(globalTempDB)) {
Review comment:
Now that we handle the single-name part differently, we don't need the check
here any more. This case will now resolve to the session catalog (mask v2
catalog named `global_temp`), and analysis will fail downstream if the name has
more than two parts.
----------------------------------------------------------------
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]