Conversation
Issue Number: None
Related PR: None
Problem Summary: Commit 23c83f48bceae6578b55dcfe9cae476b9c15fc8a added TIMESTAMP_NS with 9 fractional digits, but TIMEV2 was capped at scale 6 and time functions converted values through integral microseconds. This truncated submicrosecond results such as TIMEDIFF(TIMESTAMP_NS, TIMESTAMP_NS). Extend TIMEV2 to scale 9 while retaining its existing double microsecond-unit representation, and preserve exact nanoseconds in differences, conversions, formatting, constant folding, external TIME readers, arithmetic, and binary query results.
TIMEV2 supports scales up to 9, and time results such as TIMEDIFF on TIMESTAMP_NS preserve nanosecond precision.
- Test: Unit Test and Regression Test
- ASAN BE and FE builds passed
- 26 targeted BE unit tests passed
- 108 targeted FE unit tests passed
- Relevant timestamp_ns, TIME function, scalar function, binary protocol, and documentation regression suites passed
- Behavior changed: Yes (TIMEV2 supports nanosecond precision)
- Does this need documentation: No
jacktengg
requested review from
924060929,
Gabriel39,
englefly,
morrySnow,
starocean999 and
yiguolei
as code owners
September 13, 2026 09:03
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
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.
Issue Number: None
Related PR: None
Problem Summary: Commit 23c83f48bceae6578b55dcfe9cae476b9c15fc8a added TIMESTAMP_NS with 9 fractional digits, but TIMEV2 was capped at scale 6 and time functions converted values through integral microseconds. This truncated submicrosecond results such as TIMEDIFF(TIMESTAMP_NS, TIMESTAMP_NS). Extend TIMEV2 to scale 9 while retaining its existing double microsecond-unit representation, and preserve exact nanoseconds in differences, conversions, formatting, constant folding, external TIME readers, arithmetic, and binary query results.
TIMEV2 supports scales up to 9, and time results such as TIMEDIFF on TIMESTAMP_NS preserve nanosecond precision.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)