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

[jira] [Commented] (SPARK-49761) Fix return type nullability of schema_of_json

    [ https://issues.apache.org/jira/browse/SPARK-49761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17884064#comment-17884064 ] 

Chenhao Li commented on SPARK-49761:
------------------------------------

Created by mistake. schema_of_json only takes literal & non-null input.

> Fix return type nullability of schema_of_json
> ---------------------------------------------
>
>                 Key: SPARK-49761
>                 URL: https://issues.apache.org/jira/browse/SPARK-49761
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 4.0.0, 3.5.2
>            Reporter: Chenhao Li
>            Priority: Major
>
> The `schema_of_json` expression incorrectly marks its return type as non-nullable, which means that it should return a non-null result even for null input. This is not true because the expression is actually null-intolerant. This error can lead to NPE in the generated 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