You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Reynold Xin (JIRA)" <ji...@apache.org> on 2016/08/25 04:20:20 UTC

[jira] [Updated] (SPARK-16597) DataFrame DateType is written as an int(Days since epoch) by csv writer

     [ https://issues.apache.org/jira/browse/SPARK-16597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Reynold Xin updated SPARK-16597:
--------------------------------
    Fix Version/s: 2.1.0
                   2.0.1

> DataFrame DateType is written as an int(Days since epoch) by csv writer
> -----------------------------------------------------------------------
>
>                 Key: SPARK-16597
>                 URL: https://issues.apache.org/jira/browse/SPARK-16597
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Dean Chen
>              Labels: csv
>             Fix For: 2.0.1, 2.1.0
>
>
> import java.sql.Date
> case class DateClass(date: java.sql.Date)
> val df = spark.createDataFrame(Seq(DateClass(new Date(1468774636000L))))
> df.write.csv("test.csv")
> file content is 16999, days since epoch instead of 7/17/16



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org