mihailotim-db commented on code in PR #50345:
URL: https://github.com/apache/spark/pull/50345#discussion_r2007370044


##########
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala:
##########
@@ -1069,6 +1069,29 @@ class QueryCompilationErrorsSuite
       context = ExpectedContext(fragment = "in (select map(1,2))", start = 16, 
stop = 35)
     )
   }
+
+  test("SPARK-51580: Throw proper user facing error message when lambda 
function is out of " +
+    "place in HigherOrderFunction") {
+    checkError(
+      exception = intercept[AnalysisException] {
+        sql("select transform(x -> x + 1, array(1,2,3))")

Review Comment:
   The error would be: 
`[INVALID_LAMBDA_FUNCTION_CALL.NON_HIGHER_ORDER_FUNCTION] Invalid lambda 
function call. A lambda function should only be used in a higher order 
function.`



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