Skip to content

Commit

Permalink
Update to chrono 0.4.34 (#5385)
Browse files Browse the repository at this point in the history
* Update to chrono 0.4.34

* Update JSON test

* Fix MSRV
  • Loading branch information
tustvold authored Feb 11, 2024
1 parent 9d0abcc commit 0b45993
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ jobs:
uses: ./.github/actions/setup-builder
- name: Install cargo-msrv
run: cargo install cargo-msrv
- name: Downgrade arrow dependencies
run: cargo update -p ahash --precise 0.8.7
- name: Check arrow
working-directory: arrow
run: cargo msrv verify
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ arrow-select = { version = "50.0.0", path = "./arrow-select" }
arrow-string = { version = "50.0.0", path = "./arrow-string" }
parquet = { version = "50.0.0", path = "./parquet", default-features = false }

chrono = { version = "0.4.31", default-features = false, features = ["clock"] }
chrono = { version = "0.4.34", default-features = false, features = ["clock"] }
16 changes: 8 additions & 8 deletions arrow-cast/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1013,9 +1013,9 @@ mod tests {
assert_eq!(pretty[2], "0 days 0 hours 0 mins 0.000001000 secs");
assert_eq!(iso[3], "-PT0.000001S");
assert_eq!(pretty[3], "0 days 0 hours 0 mins -0.000001000 secs");
assert_eq!(iso[4], "P45DT50554.123456789S");
assert_eq!(iso[4], "PT3938554.123456789S");
assert_eq!(pretty[4], "45 days 14 hours 2 mins 34.123456789 secs");
assert_eq!(iso[5], "-P45DT50554.123456789S");
assert_eq!(iso[5], "-PT3938554.123456789S");
assert_eq!(pretty[5], "-45 days -14 hours -2 mins -34.123456789 secs");

let array = DurationMicrosecondArray::from(vec![
Expand All @@ -1037,9 +1037,9 @@ mod tests {
assert_eq!(pretty[2], "0 days 0 hours 0 mins 0.001000 secs");
assert_eq!(iso[3], "-PT0.001S");
assert_eq!(pretty[3], "0 days 0 hours 0 mins -0.001000 secs");
assert_eq!(iso[4], "P45DT50554.123456S");
assert_eq!(iso[4], "PT3938554.123456S");
assert_eq!(pretty[4], "45 days 14 hours 2 mins 34.123456 secs");
assert_eq!(iso[5], "-P45DT50554.123456S");
assert_eq!(iso[5], "-PT3938554.123456S");
assert_eq!(pretty[5], "-45 days -14 hours -2 mins -34.123456 secs");

let array = DurationMillisecondArray::from(vec![
Expand All @@ -1061,9 +1061,9 @@ mod tests {
assert_eq!(pretty[2], "0 days 0 hours 0 mins 1.000 secs");
assert_eq!(iso[3], "-PT1S");
assert_eq!(pretty[3], "0 days 0 hours 0 mins -1.000 secs");
assert_eq!(iso[4], "P45DT50554.123S");
assert_eq!(iso[4], "PT3938554.123S");
assert_eq!(pretty[4], "45 days 14 hours 2 mins 34.123 secs");
assert_eq!(iso[5], "-P45DT50554.123S");
assert_eq!(iso[5], "-PT3938554.123S");
assert_eq!(pretty[5], "-45 days -14 hours -2 mins -34.123 secs");

let array = DurationSecondArray::from(vec![
Expand All @@ -1085,9 +1085,9 @@ mod tests {
assert_eq!(pretty[2], "0 days 0 hours 16 mins 40 secs");
assert_eq!(iso[3], "-PT1000S");
assert_eq!(pretty[3], "0 days 0 hours -16 mins -40 secs");
assert_eq!(iso[4], "P45DT50554S");
assert_eq!(iso[4], "PT3938554S");
assert_eq!(pretty[4], "45 days 14 hours 2 mins 34 secs");
assert_eq!(iso[5], "-P45DT50554S");
assert_eq!(iso[5], "-PT3938554S");
assert_eq!(pretty[5], "-45 days -14 hours -2 mins -34 secs");
}

Expand Down
2 changes: 1 addition & 1 deletion arrow-json/src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ mod tests {

assert_json_eq(
&buf,
r#"{"duration_sec":"PT120S","duration_msec":"PT0.120S","duration_usec":"PT0.000120S","duration_nsec":"PT0.000000120S","name":"a"}
r#"{"duration_sec":"PT120S","duration_msec":"PT0.12S","duration_usec":"PT0.00012S","duration_nsec":"PT0.00000012S","name":"a"}
{"name":"b"}
"#,
);
Expand Down

0 comments on commit 0b45993

Please sign in to comment.