You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Kent Yao (Jira)" <ji...@apache.org> on 2024/07/12 10:19:00 UTC

[jira] [Resolved] (SPARK-48845) GenericUDF Can not CatchException From Child UDFs

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

Kent Yao resolved SPARK-48845.
------------------------------
    Fix Version/s: 3.5.2
                   4.0.0
       Resolution: Fixed

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

> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org