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



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/higherOrderFunctions.scala
##########
@@ -33,10 +34,10 @@ import org.apache.spark.sql.types.DataType
 case class ResolveHigherOrderFunctions(catalog: SessionCatalog) extends 
Rule[LogicalPlan] {
 
   override def apply(plan: LogicalPlan): LogicalPlan = plan.resolveExpressions 
{
-    case u @ UnresolvedFunction(fn, children, false, filter, ignoreNulls)
+    case u @ UnresolvedFunction(parts, children, false, filter, ignoreNulls)
         if hasLambdaAndResolvedArguments(children) =>
       withPosition(u) {
-        catalog.lookupFunction(fn, children) match {
+        catalog.lookupFunction(parts.asFunctionIdentifier, children) match {

Review comment:
       `asFunctionIdentifier` could fail and throw an exception for some 
identifiers. I think this should avoid that case by limiting the matches for 
`parts` in the case above.




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