cloud-fan commented on a change in pull request #27550: [SPARK-30799][SQL] 
"spark_catalog.t" should not be resolved to temp view
URL: https://github.com/apache/spark/pull/27550#discussion_r379233286
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
 ##########
 @@ -584,7 +632,29 @@ class ResolveSessionCatalog(
   object SessionCatalogAndTable {
     def unapply(nameParts: Seq[String]): Option[(CatalogPlugin, Seq[String])] 
= nameParts match {
       case SessionCatalogAndIdentifier(catalog, ident) =>
-        Some(catalog -> ident.asMultipartIdentifier)
+        if (nameParts.length == 1) {
+          // If there is only one name part, it means the current catalog is 
the session catalog.
+          // Here we return the original name part, to keep the error message 
unchanged for
+          // v1 commands.
 
 Review comment:
   We can remove 
https://github.com/apache/spark/pull/27550/files#diff-2e07be4d73605cb1941153441a0c0c14R572
 and 
https://github.com/apache/spark/pull/27550/files#diff-2e07be4d73605cb1941153441a0c0c14R651
 if we return qualified name here.

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