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

Felipe updated SPARK-55109:
---------------------------
    Description: 
import org.apache.spark.sql.catalyst.expressions.\{Literal, RaiseError}
println(RaiseError(Literal("error!")).sql)
 
3.5 generates valid SQL:
 
raise_error('error!')
 
4.0:
raise_error('USER_RAISED_EXCEPTION', map('errorMessage', 'error!')) 
 
I believe because of this change [SPARK-44838[SQL] raise_error improvement · 
apache/spark@9109d70|[https://github.com/apache/spark/commit/9109d7037f44158e72d14019eb33f9c7b8838868#diff-8fa6452a48efd4f84b09af0f6110ffe927d7ca81fe23ada651e786c7165aaa9a]]

 

and [[SPARK-46036][SQL] Removing error-class from raise_error function by 
dbatomic · Pull Request #44004 · 
apache/spark|https://github.com/apache/spark/pull/44004]
 
The SQL command raise_error only supports one param: [Spark SQL, Built-in 
Functions|https://spark.apache.org/docs/latest/api/sql/index.html]

  was:
import org.apache.spark.sql.catalyst.expressions.\{Literal, RaiseError}
println(RaiseError(Literal("error!")).sql)
 
3.5 generates valid SQL:
 
raise_error('error!')
 
4.0:
raise_error('USER_RAISED_EXCEPTION', map('errorMessage', 'error!')) 
 
I believe because of this change [[SPARK-44838][SQL] raise_error improvement · 
apache/spark@9109d70|https://github.com/apache/spark/commit/9109d7037f44158e72d14019eb33f9c7b8838868#diff-8fa6452a48efd4f84b09af0f6110ffe927d7ca81fe23ada651e786c7165aaa9a]
 
The SQL command raise_error only supports one param: [Spark SQL, Built-in 
Functions|https://spark.apache.org/docs/latest/api/sql/index.html]


> RaiseError(xyz).sql is broken in 4.0
> ------------------------------------
>
>                 Key: SPARK-55109
>                 URL: https://issues.apache.org/jira/browse/SPARK-55109
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core, SQL
>    Affects Versions: 4.0.0
>            Reporter: Felipe
>            Priority: Minor
>
> import org.apache.spark.sql.catalyst.expressions.\{Literal, RaiseError}
> println(RaiseError(Literal("error!")).sql)
>  
> 3.5 generates valid SQL:
>  
> raise_error('error!')
>  
> 4.0:
> raise_error('USER_RAISED_EXCEPTION', map('errorMessage', 'error!')) 
>  
> I believe because of this change [SPARK-44838[SQL] raise_error improvement · 
> apache/spark@9109d70|[https://github.com/apache/spark/commit/9109d7037f44158e72d14019eb33f9c7b8838868#diff-8fa6452a48efd4f84b09af0f6110ffe927d7ca81fe23ada651e786c7165aaa9a]]
>  
> and [[SPARK-46036][SQL] Removing error-class from raise_error function by 
> dbatomic · Pull Request #44004 · 
> apache/spark|https://github.com/apache/spark/pull/44004]
>  
> The SQL command raise_error only supports one param: [Spark SQL, Built-in 
> Functions|https://spark.apache.org/docs/latest/api/sql/index.html]



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