You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Gengliang Wang (Jira)" <ji...@apache.org> on 2025/01/29 03:42:00 UTC

[jira] [Resolved] (SPARK-50906) Add nullability check for if inputs of to_avro align with schema

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

Gengliang Wang resolved SPARK-50906.
------------------------------------
    Fix Version/s: 4.1.0
       Resolution: Fixed

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

> Add nullability check for if inputs of to_avro align with schema
> ----------------------------------------------------------------
>
>                 Key: SPARK-50906
>                 URL: https://issues.apache.org/jira/browse/SPARK-50906
>             Project: Spark
>          Issue Type: Improvement
>          Components: Structured Streaming
>    Affects Versions: 3.5.0, 4.0.0
>            Reporter: Fanyue Xia
>            Assignee: Fanyue Xia
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.1.0
>
>
> Previously, we don't explicitly check when input of `to_avro` is `null` but the schema does not allow `null`. As a result, a NPE will be raised in this situation. This PR adds the check during serialization before writing to avro and raises user-facing error if above occurs. 



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