Fix non-UTC ORC timestamp read correctness - #15450
Draft
res-life wants to merge 2 commits into
Draft
Conversation
Match Apache ORC timezone, rounding, and historical offset semantics for physical timestamps and schema-evolution casts. Fixes NVIDIA#15449. Signed-off-by: Chong Gao <chongg@nvidia.com>
res-life
force-pushed
the
fix-orc-non-utc-correctness
branch
from
July 31, 2026 00:45
0baee14 to
d9dec29
Compare
Signed-off-by: Chong Gao <chongg@nvidia.com>
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.
Fixes #15449.
Depends on NVIDIA/cudf-spark-jni#4917.
Description
GPU ORC reads could return incorrect timestamps in non-UTC timezones for both
physical timestamp columns and schema-evolution casts. Symptoms included
one-hour DST shifts,
NULLfor valid double-to-timestamp values, and historicaloffset mismatches before a timezone's first recorded transition.
Spark delegates these conversions to Apache ORC. ORC uses
java.util.TimeZonerules from the writer footer and reader timezone, appliestimezone conversion before millisecond rounding and overflow handling, and
skips cross-timezone conversion when writer and reader have the same rules.
The GPU path differed in all three areas: it compared timezone identities
instead of rules, performed parts of schema-evolution rounding/overflow before
timezone conversion, and used transition data that did not reproduce
java.util.TimeZonebehavior before the first recorded transition.This change aligns the GPU path with Spark/ORC and adds deterministic regression
coverage in three layers:
non-DST timezone pairs, including
Europe/Paris;timestamp,bigint,float, anddoubletotimestampschema-evolution matrix;
-1us/at/+1us, integer514952012,zero, rounding, and positive/negative overflow values.
The previous broad randomized tests sampled a large date range but were very
unlikely to hit exact DST boundaries, pre-first-transition values, zero and
overflow behavior, or the relevant same-zone/alias/directional combinations.
Validation
3 failedinAsia/Shanghai,4 failedinAmerica/New_York);OrcTimezoneSuite:46 succeeded, 0 failed.America/New_York:3 passed;Asia/Shanghai:3 passed.BUILD SUCCESS.Checklists
Documentation
Testing
Performance