From c175a8a0e85e57b674cc5161086b367347cfabb5 Mon Sep 17 00:00:00 2001 From: Elliana May Date: Sat, 8 Jun 2024 18:34:56 +0800 Subject: [PATCH] upgrade arrow-rs to 52 (#332) * Update arrow requirement from 51 to 52 Updates the requirements on [arrow](https://github.com/apache/arrow-rs) to permit the latest version. - [Changelog](https://github.com/apache/arrow-rs/blob/master/CHANGELOG-old.md) - [Commits](https://github.com/apache/arrow-rs/compare/51.0.0...51.0.0) --- updated-dependencies: - dependency-name: arrow dependency-type: direct:production ... Signed-off-by: dependabot[bot] * remove arrow bug workaround --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.toml | 2 +- crates/duckdb/src/row.rs | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5f176778..691d06e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,4 +60,4 @@ unicase = "2.6.0" url = "2.1" uuid = "1.0" vcpkg = "0.2" -arrow = { version = "51", default-features = false } +arrow = { version = "52", default-features = false } diff --git a/crates/duckdb/src/row.rs b/crates/duckdb/src/row.rs index ab6351ca..f3def7cf 100644 --- a/crates/duckdb/src/row.rs +++ b/crates/duckdb/src/row.rs @@ -559,12 +559,11 @@ impl<'stmt> Row<'stmt> { let value = array.value(row); - // TODO: remove this manual conversion once arrow-rs bug is fixed - let months = (value) as i32; - let days = (value >> 32) as i32; - let nanos = (value >> 64) as i64; - - ValueRef::Interval { months, days, nanos } + ValueRef::Interval { + months: value.months, + days: value.days, + nanos: value.nanoseconds, + } } _ => unimplemented!("{:?}", unit), },