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

Dongjoon Hyun closed SPARK-48845.
---------------------------------

> GenericUDF Can not CatchException From Child UDFs
> -------------------------------------------------
>
>                 Key: SPARK-48845
>                 URL: https://issues.apache.org/jira/browse/SPARK-48845
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.5.0, 3.5.1
>            Reporter: Junqing Li
>            Assignee: Junqing Li
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.5.2, 4.0.0
>
>
> During the upgrade from Spark 3.3.1 to 3.5.1, we encountered syntax issues 
> with this pr. The problem arose from DeferredObject currently passing a value 
> instead of a function, which prevented users from catching exceptions in 
> GenericUDF, resulting in semantic differences.
> Here is an example case we encountered. Originally, the semantics were that 
> {{str_to_map_udf}} would throw an exception due to issues with the input 
> string, while {{merge_map_udf}} could catch the exception and return a null 
> value. However, currently, any exception encountered by {{str_to_map_udf}} 
> will cause the program to fail.
> {code:java}
> select merge_map_udf(str_to_map_udf(col1), parse_map_udf(col2), map("key", 
> "value")) from table {code}
>  



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