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

[jira] [Assigned] (SPARK-49863) NormalizeFloatingNumbers degrades nullability of expressions with nested structs

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

Wenchen Fan reassigned SPARK-49863:
-----------------------------------

    Assignee: Nikhil Sheoran

> NormalizeFloatingNumbers degrades nullability of expressions with nested structs
> --------------------------------------------------------------------------------
>
>                 Key: SPARK-49863
>                 URL: https://issues.apache.org/jira/browse/SPARK-49863
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 4.0.0
>            Reporter: Nikhil Sheoran
>            Assignee: Nikhil Sheoran
>            Priority: Major
>              Labels: pull-request-available
>
> For an AttributeReference where the dataType is a nested struct such that the internal struct requires normalization (has a floating type expression), we end up not correctly propagating the nullability of an expression.
> For example, for an expression like:
> {code:java}
> namedStruct("struct", namedStruct("double", <DoubleType-field>) {code}
> The dataType prior to normalization is:
> {code:java}
> StructType(StructField("struct", StructType(StructField("double", DoubleType, true, {})), false, {})){code}
> whereas post-normalization, the dataType becomes:
> {code:java}
> StructType(StructField("struct", StructType(StructField("double", DoubleType, true, {})), true, {})) 
> {code}
>  
> We ended up converting the `nullable` attribute of the "double" field from `false` to `true`.



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