From e117ad355d168e8c8a27682f379835ea06e873db Mon Sep 17 00:00:00 2001 From: Ritchie Vink Date: Mon, 27 Sep 2021 11:06:57 +0200 Subject: [PATCH] stay complient with arrow spec --- src/io/csv/write/serialize.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/io/csv/write/serialize.rs b/src/io/csv/write/serialize.rs index 859239a4a51..52b99a9ed4c 100644 --- a/src/io/csv/write/serialize.rs +++ b/src/io/csv/write/serialize.rs @@ -13,21 +13,21 @@ use super::iterator::{BufStreamingIterator, StreamingIterator}; #[derive(Debug, PartialEq, Eq, Hash, Clone)] pub struct SerializeOptions { - // used for date32 - pub date_format: String, + /// used for date32 + pub date32_format: String, /// used for dat64 - pub datetime_format: String, - // used for time32/64 + pub date64_format: String, + /// used for time32/64 pub time_format: String, - // used for timestamp + /// used for timestamp pub timestamp_format: String, } impl Default for SerializeOptions { fn default() -> Self { Self { - date_format: "%F".to_string(), - datetime_format: "%FT%H:%M:%S.%9f".to_string(), + date32_format: "%F".to_string(), + date64_format: "%F".to_string(), time_format: "%T".to_string(), timestamp_format: "%FT%H:%M:%S.%9f".to_string(), } @@ -129,7 +129,7 @@ pub fn new_serializer<'a>( i32, temporal_conversions::date32_to_datetime, array, - &options.date_format + &options.date32_format ) } DataType::Time32(TimeUnit::Second) => { @@ -156,7 +156,7 @@ pub fn new_serializer<'a>( i64, temporal_conversions::date64_to_datetime, array, - &options.datetime_format + &options.date64_format ) } DataType::Time64(TimeUnit::Microsecond) => {