cloud-fan commented on code in PR #39095:
URL: https://github.com/apache/spark/pull/39095#discussion_r1053449969


##########
sql/core/src/main/scala/org/apache/spark/sql/internal/CatalogImpl.scala:
##########
@@ -274,7 +274,10 @@ class CatalogImpl(sparkSession: SparkSession) extends 
Catalog {
           className = className,
           isTemporary = true)
 
-      case _ => throw QueryCompilationErrors.noSuchFunctionError(ident, plan)
+      case _ =>
+        val catalogPath = (currentCatalog +:
+          
sparkSession.sessionState.catalogManager.currentNamespace).mkString(".")
+        throw QueryCompilationErrors.unresolvedRoutineError(ident, 
Seq(catalogPath), plan.origin)

Review Comment:
   This should be no different than 
https://github.com/apache/spark/pull/39095/files#diff-583171e935b2dc349378063a5841c5b98b30a2d57ac3743a9eccfe7bffcb8f2aR173
   
   To avoid duplicating code, we can even do
   ```
   case other =>
     assert(other.isInstanceOf[UnresolvedFunc])
     analyzer.checkAnalysis(other)
   ```



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

To unsubscribe, e-mail: [email protected]

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