[ 
https://issues.apache.org/jira/browse/SPARK-50119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dusan Tisma updated SPARK-50119:
--------------------------------
    Description: 
Lambdas in non-higher order functions throw 
{code:java}
INVALID_LAMBDA_FUNCTION_CALL.NON_HIGHER_ORDER_FUNCTION{code}
, however this is only thrown from other functions, and not anywhere in the 
query:
{code:java}
select if(x -> x = 2, 10, 20){code}
 throws 
{code:java}
INVALID_LAMBDA_FUNCTION_CALL.NON_HIGHER_ORDER_FUNCTION{code}
,
{code:java}
select if(not x -> x = 2, 10, 20) {code}
throws 
{code:java}
UnresolvedException{code}
The user error in the latter case needs improvement

  was:
Lambdas in non-higher order functions throw 
{code:java}
INVALID_LAMBDA_FUNCTION_CALL.NON_HIGHER_ORDER_FUNCTION{code}
, however this is only thrown from other functions, and not anywhere in the 
query. 
{code:java}
select if(x -> x = 2, 10, 20){code}
 throws 
{code:java}
INVALID_LAMBDA_FUNCTION_CALL.NON_HIGHER_ORDER_FUNCTION{code}
,

{code:java}
select if(not x -> x = 2, 10, 20) {code}
throws 
{code:java}
UnresolvedException{code}


The user error in the latter case needs improvement


> UnresolvedException thrown instead of 
> INVALID_LAMBDA_FUNCTION_CALL.NON_HIGHER_ORDER_FUNCTION
> --------------------------------------------------------------------------------------------
>
>                 Key: SPARK-50119
>                 URL: https://issues.apache.org/jira/browse/SPARK-50119
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>    Affects Versions: 4.0.0
>            Reporter: Dusan Tisma
>            Priority: Minor
>
> Lambdas in non-higher order functions throw 
> {code:java}
> INVALID_LAMBDA_FUNCTION_CALL.NON_HIGHER_ORDER_FUNCTION{code}
> , however this is only thrown from other functions, and not anywhere in the 
> query:
> {code:java}
> select if(x -> x = 2, 10, 20){code}
>  throws 
> {code:java}
> INVALID_LAMBDA_FUNCTION_CALL.NON_HIGHER_ORDER_FUNCTION{code}
> ,
> {code:java}
> select if(not x -> x = 2, 10, 20) {code}
> throws 
> {code:java}
> UnresolvedException{code}
> The user error in the latter case needs improvement



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to