Skip to content

fix(adbc): support named Arrow timezones - #515

Merged
rahuls-db merged 3 commits into
mainfrom
rahul-singhal_data/rahul-singhal/adbc-chrono-tz
Nov 30, 2026
Merged

rahuls-db merged 3 commits into
mainfrom
rahul-singhal_data/rahul-singhal/adbc-chrono-tz

Conversation

@rahuls-db

@rahuls-db rahuls-db commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Enable Arrow named-timezone support in the Rust ADBC crate so downstream Arrow consumers can render kernel timestamps tagged with names such as Etc/UTC. Add a regression test that formats an Etc/UTC timestamp through Arrow's display API and NOTICE attribution for the added chrono-tz, phf, phf_shared, and siphasher dependencies.

This change is scoped to adbc/ and does not alter shared-kernel behavior.

Testing

  • cargo test --manifest-path adbc/Cargo.toml (96 unit tests and the named-timezone regression test passed; 6 credentialed live tests ignored as designed)
  • cargo clippy --manifest-path adbc/Cargo.toml --all-targets -- -D warnings
  • Full root and ADBC cargo +stable fmt checks pass with an explicit default configuration to avoid inheriting formatter settings from the parent Universe checkout
  • Named-timezone regression test rerun after formatting correction: passed
  • cargo-deny 0.20.2 --manifest-path adbc/Cargo.toml --config deny.toml check licenses (licenses ok; no policy changes)
  • cargo package --list --allow-dirty --manifest-path adbc/Cargo.toml confirms NOTICE is included
  • git diff --check

Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>
@rahuls-db
rahuls-db marked this pull request as ready for review November 30, 2026 18:03
@rahuls-db
rahuls-db requested a review from a team as a code owner November 30, 2026 18:03

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 2 Low

Looks good, with 2 low concerns. Turning on arrow-array's chrono-tz feature is the right fix for formatting named timezones. The regression test would fail if the feature were removed, but it doesn't exercise any driver code.

Comment thread adbc/tests/timezone.rs
use arrow_cast::display::array_value_to_string;

#[test]
fn supports_named_timezones_emitted_by_the_kernel() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Low — The test hand-builds an Arrow array and never exercises the adbc driver or kernel, so its name overstates what it covers. It only checks that the chrono-tz feature is enabled. Rename it, or add a test that reads a real driver timestamp column.

🔀 Found by Claude Opus 5.5 · confirmed by the judge

Comment thread adbc/Cargo.toml Resolved
Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 2 Low

Looks good: 2 low concerns. Turning on the chrono-tz feature is the right fix. The test would fail without it, because arrow-array can't parse "Etc/UTC" without that feature.

Comment thread adbc/tests/timezone.rs
@@ -0,0 +1,9 @@
use arrow_array::TimestampMicrosecondArray;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Low — The new test file lacks the Databricks Apache-2.0 license header that adbc/tests/live.rs has. Add the same header at the top.

🔀 Found by Claude Opus 5.5 · confirmed by the judge

Comment thread adbc/tests/timezone.rs Resolved
Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

✅ No issues identified.

@rahuls-db
rahuls-db enabled auto-merge November 30, 2026 19:42
Comment thread adbc/Cargo.toml
adbc_core = "0.24"
adbc_ffi = { version = "0.24", optional = true }
arrow-array = "59"
arrow-array = { version = "59", features = ["chrono-tz"] }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chrono-tz is unmaintained now (RUSTSEC-2026-0555). Is there a path to use something else in the future?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The longer-term path would be to adopt an Arrow version with a maintained timezone backend, potentially Jiff. Arrow 59 currently implements named-timezone support through chrono-tz, so this PR enables its existing capability to handle timestamps such as Etc/UTC. Replacing it directly in ADBC would require changing Arrow itself. We should track that migration explicitly; the advisory is for maintenance status, not a reported vulnerability.

@rahuls-db
rahuls-db added this pull request to the merge queue Nov 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 30, 2026
@rahuls-db
rahuls-db added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit c8113e4 Nov 30, 2026
24 of 27 checks passed

This branch was previously deployed

1 inactive deployment
azure-prod — 353ec5f3 Deployed Nov 30, 2026 by rahuls-db via followup #4496
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants