sunchao commented on a change in pull request #32082:
URL: https://github.com/apache/spark/pull/32082#discussion_r615227429



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -2053,9 +2063,74 @@ class Analyzer(override val catalogManager: 
CatalogManager)
                   name, other.getClass.getCanonicalName)
               }
             }
-          case u @ UnresolvedFunction(funcId, arguments, isDistinct, filter, 
ignoreNulls) =>
+          case UnresolvedFunction(NonSessionCatalogAndIdentifier(v2Catalog, 
ident), arguments,

Review comment:
       This logic is not correct - when there is no namespace part in the 
identifier, it should check built-in and temp functions first, and also handle 
function references in views. Only if this part failed it should use the 
default catalog (whether that be the V1 session catalog or a V2 catalog). Will 
fix this.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to