fix(driver): support extended datetime ranges with chrono - #797
Open
TCeason wants to merge 2 commits into
Open
Conversation
Replace Jiff-backed timestamp values and session timezones with chrono and chrono-tz to preserve the SQL timestamp bounds, including local year 10000 after timezone conversion. Remove Arrow timestamp clamping without expanding the server's accepted UTC range. Preserve UTC NaiveDateTime conversion and fold/gap disambiguation. Update formatting, parameter serialization, and Python/Node.js bindings. Add focused boundary, offset, nested timestamp, DST, and Arrow regression coverage plus a server integration test. Far-future DST calculations follow chrono-tz and may differ from Jiff. BREAKING CHANGE: Value timestamp variants now contain chrono DateTime values, and ResultFormatSettings::timezone uses chrono_tz::Tz. Remove zoned_to_chrono_datetime and zoned_to_chrono_fixed_offset; callers can use the stored chrono values directly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace Jiff-backed timestamps with Chrono to fix decoding failures and
silent Arrow clamping near Databend's timestamp bounds.
9999-12-31 23:59:59.999999UTC, microsecond precision, andexplicit
TIMESTAMP_TZoffsets.expanding the server's accepted UTC range.
Compatibility
This is a breaking Rust API change, intended for release 0.35.0:
DateTimevalues.ResultFormatSettings::timezonenow useschrono_tz::Tz.zoned_to_chrono_*conversion helpers.Existing row conversions to
NaiveDateTimeandDateTime<Tz>remainsupported. Python/Node.js retain their native datetime/Date types and
existing range/precision limits. Far-future DST behavior follows
chrono-tz and may differ from Jiff.
Validation
Validated against Databend Query
v1.2.911-nightly-3b719621c4:Link: databendlabs/databend#20425
Flight SQL (UTC boundary coverage for Flight SQL).
including Python cp38.