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

Hyukjin Kwon resolved SPARK-38163.
----------------------------------
    Fix Version/s: 3.3.0
       Resolution: Fixed

Issue resolved by pull request 35467
[https://github.com/apache/spark/pull/35467]

> Preserve the error class of `AnalysisException` while constructing of 
> function builder
> --------------------------------------------------------------------------------------
>
>                 Key: SPARK-38163
>                 URL: https://issues.apache.org/jira/browse/SPARK-38163
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.3.0
>            Reporter: Max Gekk
>            Assignee: Max Gekk
>            Priority: Major
>             Fix For: 3.3.0
>
>
> When the cause exception is `AnalysisException` at
> https://github.com/apache/spark/blob/9c02dd4035c9412ca03e5a5f4721ee223953c004/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala#L132,
>  Spark loses info about the error class. Need to preserve the info.
> The example below demonstrates the issue:
> {code:scala}
> scala> try { sql("select format_string('%0$s', 'Hello')") } catch { case e: 
> org.apache.spark.sql.AnalysisException => println(e.getErrorClass) }
> null
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to