You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature: support cast date to timestamp with tz #14638
Is your feature request related to a problem or challenge?
> select to_char(arrow_cast('2023-09-04'::date, 'Timestamp(Second, Some("UTC"))'), '%Y-%m-%dT%H:%M:%S%.3f');
This feature is not implemented: Unsupported CAST from Date32 to Timestamp(Second, Some("UTC"))
Activity
xudong963 commentedon Feb 14, 2025
It seems that
Date32/Date64doesn't support TZ, so if we want to support the cast, we should add TZ toDate32/Date64firstly?friendlymatthew commentedon Feb 15, 2025
take
friendlymatthew commentedon Feb 16, 2025
I'm not sure if
Datetypes should be time-zone aware. Postgres has a similarDatetime and does not allow dates with associated time zones.However when casting a
Dateinto aTimestamp, we should definitely support various time zones! I've posted a PR for that.friendlymatthew commentedon Feb 16, 2025
Datafusion-wise, I tested this feature in this branch and it works as expected:
Once apache/arrow-rs#7141 lands, I'll follow up with some test cases in
cast.slt.friendlymatthew commentedon Feb 25, 2025
The next release of arrow should support this mini feature! @Omega359, is there a timeline for upgrading the arrow dependency in datafusion?
Omega359 commentedon Feb 25, 2025
arrow-rs releases are not in sync with df releases so it will likely be df 47 or 48
Omega359 commentedon Mar 26, 2025
I believe the arrow update is in the arrow 54.3.0 release so once DF is upgraded to that release we can verify it in DF.
friendlymatthew commentedon Mar 27, 2025
Thank you @Omega359. I'll make sure to follow up with some SLT test cases.