Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
stay complient with arrow spec
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Sep 27, 2021
1 parent 99a12aa commit e117ad3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/io/csv/write/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
Expand Down Expand Up @@ -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) => {
Expand All @@ -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) => {
Expand Down

0 comments on commit e117ad3

Please sign in to comment.