From 2490c169ebc1f7f49d53354c03d9c85bf0777bb4 Mon Sep 17 00:00:00 2001 From: Rahul Singhal Date: Mon, 30 Nov 2026 17:58:40 +0000 Subject: [PATCH 1/3] fix(adbc): support named Arrow timezones Signed-off-by: Rahul Singhal --- adbc/Cargo.lock | 36 ++++++++++++++++++++++++++++++++++++ adbc/Cargo.toml | 3 ++- adbc/tests/timezone.rs | 9 +++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 adbc/tests/timezone.rs diff --git a/adbc/Cargo.lock b/adbc/Cargo.lock index fa0db928..d90a6556 100644 --- a/adbc/Cargo.lock +++ b/adbc/Cargo.lock @@ -122,6 +122,7 @@ dependencies = [ "arrow-data", "arrow-schema", "chrono", + "chrono-tz", "half", "hashbrown 0.17.1", "libc", @@ -429,6 +430,16 @@ dependencies = [ "windows-link", ] +[[package]] +name = "chrono-tz" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6139a8597ed92cf816dfb33f5dd6cf0bb93a6adc938f11039f371bc5bcd26c3" +dependencies = [ + "chrono", + "phf", +] + [[package]] name = "cipher" version = "0.4.4" @@ -636,6 +647,7 @@ dependencies = [ "adbc_ffi", "arrow-array", "arrow-buffer", + "arrow-cast", "arrow-schema", "databricks-sql-kernel", "serde_json", @@ -1902,6 +1914,24 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "phf" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "913273894cec178f401a31ec4b656318d95473527be05c0752cc41cdc32be8b7" +dependencies = [ + "phf_shared", +] + +[[package]] +name = "phf_shared" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06005508882fb681fd97892ecff4b7fd0fee13ef1aa569f8695dae7ab9099981" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project-lite" version = "0.2.17" @@ -2406,6 +2436,12 @@ dependencies = [ "time", ] +[[package]] +name = "siphasher" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" + [[package]] name = "slab" version = "0.4.12" diff --git a/adbc/Cargo.toml b/adbc/Cargo.toml index 69380384..559af9d1 100644 --- a/adbc/Cargo.toml +++ b/adbc/Cargo.toml @@ -26,7 +26,7 @@ publish = false [dependencies] adbc_core = "0.24" adbc_ffi = { version = "0.24", optional = true } -arrow-array = "59" +arrow-array = { version = "59", features = ["chrono-tz"] } arrow-buffer = "59" arrow-schema = "59" # Native Rust integration with the kernel crate in this repository. The @@ -38,6 +38,7 @@ tokio = { version = "1", features = ["rt-multi-thread"] } [dev-dependencies] adbc_driver_manager = "0.24" +arrow-cast = "59" wiremock = "0.6" [features] diff --git a/adbc/tests/timezone.rs b/adbc/tests/timezone.rs new file mode 100644 index 00000000..d33b60c0 --- /dev/null +++ b/adbc/tests/timezone.rs @@ -0,0 +1,9 @@ +use arrow_array::TimestampMicrosecondArray; +use arrow_cast::display::array_value_to_string; + +#[test] +fn supports_named_timezones_emitted_by_the_kernel() { + let values = TimestampMicrosecondArray::from(vec![Some(0)]).with_timezone("Etc/UTC"); + + assert_eq!(array_value_to_string(&values, 0).unwrap(), "1970-01-01T00:00:00Z"); +} From 0ab35a7c34b984c3ff58a2795f3461129b295e73 Mon Sep 17 00:00:00 2001 From: Rahul Singhal Date: Mon, 30 Nov 2026 18:35:35 +0000 Subject: [PATCH 2/3] docs(adbc): attribute named-timezone dependencies Signed-off-by: Rahul Singhal --- adbc/NOTICE | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/adbc/NOTICE b/adbc/NOTICE index 7cda1ab7..cdc63bbf 100644 --- a/adbc/NOTICE +++ b/adbc/NOTICE @@ -32,6 +32,11 @@ Project URL: https://github.com/chronotope/chrono Copyright: Copyright (c) 2014--2026, Kang Seonghoon and contributors; Copyright (c) 2014, Kang Seonghoon +Package: chrono-tz +Project URL: https://github.com/chronotope/chrono-tz +Copyright: Copyright (c) 2016-2024 Benjamin Sago & the chronotope maintainers + + Package: dashmap Project URL: https://github.com/xacrimon/dashmap Copyright: Copyright (c) 2025 Joel Wejdenstål @@ -107,6 +112,16 @@ Project URL: https://github.com/RustCrypto/password-hashes Copyright: Copyright (c) 2017 Artyom Pavlov; Copyright (c) 2018-2023 The RustCrypto Project Developers +Package: phf +Project URL: https://github.com/rust-phf/rust-phf +Copyright: Copyright (c) 2014-2022 Steven Fackler, Yuki Okushi + + +Package: phf_shared +Project URL: https://github.com/rust-phf/rust-phf +Copyright: Copyright (c) 2014-2022 Steven Fackler, Yuki Okushi + + Package: pkcs8 Project URL: https://github.com/RustCrypto/formats/tree/master/pkcs8 Copyright: Copyright (c) 2020-2023 The RustCrypto Project Developers @@ -142,6 +157,11 @@ Project URL: https://github.com/serde-rs/json Copyright: Copyright serde_json Authors. +Package: siphasher +Project URL: https://github.com/jedisct1/rust-siphash +Copyright: Copyright 2012-2016 The Rust Project Developers; Copyright 2016-2026 Frank Denis + + Package: thiserror Project URL: https://github.com/dtolnay/thiserror Copyright: Copyright thiserror Authors. From 353ec5f3cb7c4fb6d6c85b0ebba0af8e2e8a7e18 Mon Sep 17 00:00:00 2001 From: Rahul Singhal Date: Mon, 30 Nov 2026 18:52:18 +0000 Subject: [PATCH 3/3] style(adbc): format timezone regression assertion Signed-off-by: Rahul Singhal --- adbc/tests/timezone.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/adbc/tests/timezone.rs b/adbc/tests/timezone.rs index d33b60c0..8ca62d2c 100644 --- a/adbc/tests/timezone.rs +++ b/adbc/tests/timezone.rs @@ -5,5 +5,8 @@ use arrow_cast::display::array_value_to_string; fn supports_named_timezones_emitted_by_the_kernel() { let values = TimestampMicrosecondArray::from(vec![Some(0)]).with_timezone("Etc/UTC"); - assert_eq!(array_value_to_string(&values, 0).unwrap(), "1970-01-01T00:00:00Z"); + assert_eq!( + array_value_to_string(&values, 0).unwrap(), + "1970-01-01T00:00:00Z" + ); }