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

File data sources don't respect provided user schema nullability for all APIs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.0.0
    • None
    • Spark Core
    • None

    Description

      DataFrameReader has 3 APIs for JSON reading

      • json(DataSet[String])
      • json(Rdd)
      • json(filePath)

      First two APIs respects provided user schema nullability when spark flag `spark.sql.legacy.respectNullabilityInTextDatasetConversion` is set to true, but third one does not respect and provided schema nullability is always overriden to true.

      Some users just want to have a validation of data and to get exception when some field is nullable.

      Attachments

        Activity

          People

            Unassigned Unassigned
            uros.stankovic Uros Stankovic
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: