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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.5.0
    • 1.5.1, 1.6.0
    • SQL
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: