fix: [branch-0.14] backport #3865 - handle ambiguous and non-existent local times#3937
Merged
andygrove merged 3 commits intoapache:branch-0.14from Apr 14, 2026
Merged
Conversation
* fix: choose earliest time when ambiguous * fix: handle non-existent times due to time change * test: add unit tests for ambiguous and non-existent local times * refactor: remove unnecessary catch_unwind in tests * test: add spark test for timestampntz dst casting * refactor: remove unwrap from resolve_local_datetime --------- Co-authored-by: Matthew Alex <malex@palantir.com>
This was referenced Apr 13, 2026
The cherry-pick of apache#3865 inadvertently included Days expression tests from apache#3746, which is not present on branch-0.14.
Member
Author
|
@matthewalex4 could you review? |
matthewalex4
approved these changes
Apr 14, 2026
Contributor
matthewalex4
left a comment
There was a problem hiding this comment.
LGTM, thanks @andygrove.
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.
Which issue does this PR close?
Backport of #3865 to branch-0.14.
Rationale for this change
PR #3865 fixes handling of ambiguous and non-existent local times (e.g., during DST transitions) when casting TimestampNTZ to Timestamp. This resolves some panics.
What changes are included in this PR?
Cherry-pick of commit 6565de9 from main. A minor conflict in the test file was resolved (new tests appended after existing tests).
How are these changes tested?
Tests are included in the original PR and were cherry-picked along with the fix.