You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Max Gekk (Jira)" <ji...@apache.org> on 2024/09/02 06:21:00 UTC

[jira] [Resolved] (SPARK-49275) Fix return type nullness of the xpath expression

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

Max Gekk resolved SPARK-49275.
------------------------------
    Resolution: Fixed

> Fix return type nullness of the xpath expression
> ------------------------------------------------
>
>                 Key: SPARK-49275
>                 URL: https://issues.apache.org/jira/browse/SPARK-49275
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 4.0.0
>            Reporter: Chenhao Li
>            Assignee: Chenhao Li
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>
> The `xpath` expression incorrectly marks its return type as array of non-null strings. However, it can actually return an array containing nulls. This can cause NPE in code generation, such as query `select coalesce(xpath(repeat('<a></a>', id), 'a')[0], '') from range(1, 2)`.



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