Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-49863

NormalizeFloatingNumbers degrades nullability of expressions with nested structs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0
    • SQL

    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:

      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, {})) 
      

       

      We ended up converting the `nullable` attribute of the "double" field from `false` to `true`.

      Attachments

        Issue Links

          Activity

            People

              nikhilsheoran-db Nikhil Sheoran
              nikhilsheoran-db Nikhil Sheoran
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: