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

UDT type is not expanded into its StructType in the schema definition

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.0.0
    • None
    • SQL

    Description

      A UDT type field does not show up as constituent struct type in the schema. Instead it shows up as UserDefinedType class .

      For eg: it shows up as

      root
       |-- message: test (nullable = true)

       

      But mesage is a field of type UDT with schema represented as 

      StructField("intField", IntegerType, nullable = false),
      StructField("stringField", StringType, nullable = false)))

      so message field should be a struct type, with schema as

      root
       |-- message: struct (nullable = true)
       |    |-- intField: integer (nullable = false)
       |    |-- stringField: string (nullable = false)

       

      will be opening a PR and along with bug test

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ashahid7 Asif
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: