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

For json data source, date values are saved as int strings

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.5.1, 1.6.0
    • Component/s: SQL
    • Labels:
      None

      Description

      val df = Seq((1, java.sql.Date.valueOf("1900-01-01"))).toDF("i", "j")
      df.write.format("json").save("/tmp/testJson")
      
      sc.textFile("/tmp/testJson").collect.foreach(println)
      
      {"i":1,"j":"-25567"}
      

        Attachments

          Activity

            People

            • Assignee:
              yhuai Yin Huai
              Reporter:
              yhuai Yin Huai
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: