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

Commit

Permalink
Add simple test for Time64 with TimeUnit::Nanosecond
Browse files Browse the repository at this point in the history
  • Loading branch information
VasanthakumarV committed Sep 26, 2021
1 parent a8ab26d commit 9a85313
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/it/compute/temporal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,20 @@ impl TestData {
second: Some(UInt32Array::from(&[Some(18), None])),
nanosecond: Some(UInt32Array::from(&[Some(0), None])),
},
DataType::Time64(TimeUnit::Nanosecond) => TestData {
input: Box::new(
Int64Array::from(&[Some(378000000100), None]).to(data_type.clone()),
),
year: None,
month: None,
day: None,
weekday: None,
iso_week: None,
hour: Some(UInt32Array::from(&[Some(0), None])),
minute: Some(UInt32Array::from(&[Some(6), None])),
second: Some(UInt32Array::from(&[Some(18), None])),
nanosecond: Some(UInt32Array::from(&[Some(100), None])),
},
DataType::Timestamp(TimeUnit::Microsecond, None) => TestData {
// 68216970000000 (Epoch Microsecond) has 29th Feb (leap year)
input: Box::new(
Expand All @@ -137,6 +151,7 @@ impl TestData {
DataType::Date64,
DataType::Time32(TimeUnit::Second),
DataType::Time64(TimeUnit::Microsecond),
DataType::Time64(TimeUnit::Nanosecond),
DataType::Timestamp(TimeUnit::Microsecond, None),
]
}
Expand Down

0 comments on commit 9a85313

Please sign in to comment.