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

JsonRDD.nullTypeToStringType does not convert all NullType to StringType

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.1.0
    • SQL
    • None

    Description

      Failed on

      val schemaRDD = jsonRDD(sparkContext.parallelize(Seq("""{"record": [{"children": null}]}""")))
      
      schemaRDD.schema
      StructType(ArrayBuffer(StructField(record,ArrayType(StructType(ArrayBuffer(StructField(children,NullType,true))),false),true)))
      

      You can see the children field is still NullType.

      Attachments

        Issue Links

          Activity

            People

              yhuai Yin Huai
              yhuai Yin Huai
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: