pierre-warnier commented on issue #9183:
URL: https://github.com/apache/arrow-rs/issues/9183#issuecomment-6973091354

   Following up on @alamb's first step: here is where `chrono` appears in the 
public API today.
   
   Method: `cargo public-api -sss --all-features` (v0.52.0, nightly 2026-11-17) 
on every workspace crate that depends on `chrono`, at 5d46410 (60.2.0), then 
grep for `chrono`. `arrow-arith`, `arrow-csv`, `arrow-json`, `parquet`, 
`parquet-variant-compute` and `parquet-variant-json` have no `chrono` type in 
their signatures. `arrow` only re-exports the items below.
   
   | Crate | Item | chrono type |
   |---|---|---|
   | arrow-array | `temporal_conversions::*` (25 fns: `as_date`, `as_datetime`, 
`as_datetime_with_timezone`, `as_time`, `as_duration`, `date32_to_datetime`, 
`timestamp_*_to_datetime`, `time*_to_time`, `time_to_time*`, 
`duration_*_to_duration`, ...) | `NaiveDate`, `NaiveDateTime`, `NaiveTime`, 
`Duration`, `DateTime<Tz>` |
   | arrow-array | 
`PrimitiveArray::value_as_{date,datetime,datetime_with_tz,time,duration}` | 
`NaiveDate`, `NaiveDateTime`, `DateTime<Tz>`, `NaiveTime`, `Duration` |
   | arrow-array | `ArrowTimestampType::{make_value, from_naive_datetime, 
from_datetime<Tz: TimeZone>}` (trait methods, implemented by the 4 
`Timestamp*Type`s) | `NaiveDateTime`, `DateTime<Tz>`, bound `chrono::TimeZone` |
   | arrow-array | `Date32Type::{to_naive_date, to_naive_date_opt, 
from_naive_date}`, `Date64Type::{to_naive_date_opt, from_naive_date}` | 
`NaiveDate` |
   | arrow-array | `impl chrono::TimeZone for timezone::Tz` (`offset_from_*`), 
`impl chrono::Offset for timezone::TzOffset` (`fix`) | `TimeZone`, `Offset`, 
`FixedOffset`, `LocalResult`, `NaiveDate(Time)` |
   | arrow-array | `timezone::GapInfo` (`new`, pub fields `begin`, `end`) | 
`NaiveDateTime`, `DateTime<Tz>` |
   | arrow-array, arrow | cargo feature `chrono-tz` | feature name |
   | arrow-cast | `parse::string_to_datetime<T: TimeZone>` | `DateTime<T>`, 
bound `chrono::TimeZone` |
   | parquet-variant | `Variant::{Date, Time, TimestampMicros, TimestampNanos, 
TimestampNtzMicros, TimestampNtzNanos}` (enum payloads) | `NaiveDate`, 
`NaiveTime`, `DateTime<Utc>`, `NaiveDateTime` |
   | parquet-variant | `Variant::as_{naive_date, time_utc, timestamp_micros, 
timestamp_nanos, timestamp_ntz_micros, timestamp_ntz_nanos}`, `From<NaiveDate / 
NaiveTime / NaiveDateTime / DateTime<Utc>> for Variant` | same |
   | parquet_derive | generated code for `NaiveDate` / `NaiveDateTime` fields 
calls `::chrono::...` | `NaiveDate`, `NaiveDateTime` |
   
   Not types, but tied to chrono's behaviour: the format strings in 
`arrow_cast::display::FormatOptions::with_{date,datetime,timestamp,timestamp_tz,time}_format`
 and in `arrow_csv::WriterBuilder::with_*_format` are parsed as chrono 
`strftime` items. Moving the internals to `jiff::fmt::strtime` would change 
what some of those strings mean, so they need their own compatibility note.
   
   Most of these are free functions or inherent methods, so a `chrono` feature 
with `#[deprecated]` items is straightforward. The harder ones are the trait 
impls on `Tz`/`TzOffset`, the `ArrowTimestampType` trait methods, and the 
`Variant` enum payloads, where a feature flag would change the shape of a type 
rather than add items.
   
   If it helps, I can open the feature-gating PRs, one per crate starting with 
`arrow-array`, with jiff equivalents alongside the deprecated chrono items. 
I'll wait for a go on the shape (feature name, default on or off) before 
starting.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to