Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/15147
  
    To continue the discussion of JIRA, I think the issue you faced is to read 
those in CSV?
    
    Whether it is intended or not in `FastDateFormat`, the default pattern 
`"yyyy-MM-dd'T'HH:mm:ss.SSSZZ"` covers this.
    
    it seems I can't reproduce the issue you met in the JIRA. Have you tried 
the problematic codes in the master branch? 
    
    That would not ran in Spark 2.0 but we made a change.
    
    ```scala
    val path = "/tmp/timestamps"
    val textDf = Seq(
      "time",
      "2015-07-20T15:09:23.736-0500",
      "2015-07-20T15:10:51.687-0500",
      "2015-11-21T23:15:01.499-0600").toDF()
    textDf.coalesce(1).write.text(path)
    val df = spark.read.format("csv")
      .option("header", "true")
      .option("inferSchema", "true")
      .load(path)
    df.show()
    df.printSchema()
    ```
    
    works fine
    
    ```
    +--------------------+
    |                time|
    +--------------------+
    |2015-07-20 13:09:...|
    |2015-07-20 13:10:...|
    |2015-11-21 21:15:...|
    +--------------------+
    
    root
     |-- time: timestamp (nullable = true)
    
    ```
     


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to