Shubhambhusate commented on code in PR #53542:
URL: https://github.com/apache/spark/pull/53542#discussion_r2643096361


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala:
##########
@@ -1633,6 +1635,25 @@ class SessionCatalog(
       throw 
UserDefinedFunctionErrors.notAScalarFunction(function.name.nameParts)
     }
     (input: Seq[Expression]) => {
+      // Check if any input contains a lambda variable
+      val hasLambdaVar = input.exists { expr =>
+        expr.find {
+          case _: NamedLambdaVariable => true
+          case _: UnresolvedNamedLambdaVariable => true
+          case _ => false
+        }.isDefined
+      }
+      if (hasLambdaVar) {
+        val formattedInputs = input.map {
+          case v: NamedLambdaVariable => "lambda " + v.name
+          case v: UnresolvedNamedLambdaVariable => "lambda " + v.name
+          case e => e.sql
+        }.mkString(", ")

Review Comment:
   Thanks for the response i have change made required change in the code to 
remove function input in the error. Please review it



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