You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Nikhil Sheoran (Jira)" <ji...@apache.org> on 2024/10/03 01:13:00 UTC
[jira] [Updated] (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 ]
Nikhil Sheoran updated SPARK-49863:
-----------------------------------
Description:
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}
Essentially, we ended up converting the `nullable` attribute of "double" field from `false` to `true`.
was:
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:
```
namedStruct("struct", namedStruct("double", <DoubleType-field>)
```
The dataType prior to normalization is:
```
StructType(StructField("struct", StructType(StructField("double", DoubleType, true, {})), false, {}))
```
whereas post-normalization, the dataType becomes:
```
StructType(StructField("struct", StructType(StructField("double", DoubleType, true, {})), true, {}))
```
Essentially, we ended up converting the `nullable` attribute of "double" field from `false` to `true`.
> 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
> Priority: Major
>
> 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}
> Essentially, we ended up converting the `nullable` attribute of "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