srielau commented on code in PR #54765:
URL: https://github.com/apache/spark/pull/54765#discussion_r2943188234


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionResolution.scala:
##########
@@ -75,21 +75,52 @@ class FunctionResolution(
 
   /**
    * Produces the ordered list of fully qualified candidate names for 
resolution.
+   * Every candidate is 3-part (catalog.database.function), assuming search 
path
+   * entries are catalog.database (2-part).
    *
    * @param nameParts The function name parts.
-   * @return A sequence of fully qualified function names to attempt 
resolution with.
+   * @return A sequence of fully qualified 3-part names to attempt resolution 
with.
    */
   private def resolutionCandidates(nameParts: Seq[String]): Seq[Seq[String]] = 
{
+    def ensureThreePart(parts: Seq[String]): Seq[String] =

Review Comment:
   After the .collect { ... } that builds the list of display names, added 
.distinct so that when a temp function shadows a builtin (same display name, 
different FunctionIdentifier and SYSTEM vs USER), the name appears only once, 
matching the v2 path (ShowFunctionsExec).



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