Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 73F22200B49 for ; Tue, 19 Jul 2016 08:57:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 72938160A76; Tue, 19 Jul 2016 06:57:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BC04E160A89 for ; Tue, 19 Jul 2016 08:57:21 +0200 (CEST) Received: (qmail 25468 invoked by uid 500); 19 Jul 2016 06:57:20 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 25453 invoked by uid 99); 19 Jul 2016 06:57:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jul 2016 06:57:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B95512C0278 for ; Tue, 19 Jul 2016 06:57:20 +0000 (UTC) Date: Tue, 19 Jul 2016 06:57:20 +0000 (UTC) From: "Hyukjin Kwon (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (SPARK-16216) CSV data source does not write date and timestamp correctly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 19 Jul 2016 06:57:22 -0000 [ https://issues.apache.org/jira/browse/SPARK-16216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15383680#comment-15383680 ] Hyukjin Kwon edited comment on SPARK-16216 at 7/19/16 6:56 AM: --------------------------------------------------------------- I can close existing PR and open another to match both (without supporting {{dateFormat}} for writing) for simplicity. Actually, initial proposal was just for CSV to match JSON and to add a support {{dateFormat}} for writing as well but it become kind of bigger. Just FYI, I had a talk about him, here https://github.com/apache/spark/pull/13912#issuecomment-228586981 I don't have strong preference. I will follow your decision! was (Author: hyukjin.kwon): I can close existing PR and open another to match both (without supporting {{dateFormat}} for writing) for simplicity. Actually, initial proposal was just to add a support {{dateFormat}} for writing as well but it become kind of bigger. Just FYI, I had a talk about him, here https://github.com/apache/spark/pull/13912#issuecomment-228586981 I don't have strong preference. I will follow your decision! > CSV data source does not write date and timestamp correctly > ----------------------------------------------------------- > > Key: SPARK-16216 > URL: https://issues.apache.org/jira/browse/SPARK-16216 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 2.0.0 > Reporter: Hyukjin Kwon > Priority: Minor > > Currently, CSV data source write {{DateType}} and {{TimestampType}} as below: > {code} > +----------------+ > | date| > +----------------+ > |1440637200000000| > |1414459800000000| > |1454040000000000| > +----------------+ > {code} > It would be nicer if it write dates and timestamps as a formatted string just like JSON data sources. > Also, CSV data source currently supports {{dateFormat}} option to read dates and timestamps in a custom format. It might be better if this option can be applied in writing as well. -- 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