Repository navigation
[feat](datalake) Support nanosecond timestamps in Iceberg and Paimon #68934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Gabriel39
merged 13 commits into
apache:master
from
Gabriel39:dev/external-timestamp-ns
Oct 15, 2026
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
fe45d97
[feat](datalake) Support nanosecond timestamps in Iceberg and Paimon
Gabriel39 c2ea4eb
[refactor](datalake) Limit native nanosecond reads to format V2
Gabriel39 80052cf
[refactor](iceberg) Split timestamp kinds into four distinct types
Gabriel39 98bda24
[fix](datalake) Preserve nanoseconds across ORC reads and Iceberg ope…
Gabriel39 37c6355
[fix](regression) Align Paimon timestamp expectations with nanosecond…
Gabriel39 bdd0c0a
[fix](external) Correct nanosecond defaults, precision and ORC decoding
Gabriel39 32f59f9
[fix](external) Check Iceberg date promotions and initialize ORC test…
Gabriel39 ba7341c
[fix](iceberg) Preserve nanosecond semantics after cleanup and filtering
Gabriel39 7ec4599
[refactor](be) Isolate external schema evolution casts
Gabriel39 19b0a21
[refactor](be) Centralize ORC timestamp decoding context
Gabriel39 261b7b5
[fix](be) Give the ORC timestamp read plan external linkage
Gabriel39 1d617d1
[fix](datalake) Preserve nanos schemas and safe Iceberg filters
Gabriel39 85d1412
[fix](regression) Align TVF cases with V2 schema inference
Gabriel39 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
38 changes: 38 additions & 0 deletions
38
be/src/core/data_type_serde/orc_timestamp_decode_context.cpp
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| // Licensed to the Apache Software Foundation (ASF) under one | ||
| // or more contributor license agreements. See the NOTICE file | ||
| // distributed with this work for additional information | ||
| // regarding copyright ownership. The ASF licenses this file | ||
| // to you under the Apache License, Version 2.0 (the | ||
| // "License"); you may not use this file except in compliance | ||
| // with the License. You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, | ||
| // software distributed under the License is distributed on an | ||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| // KIND, either express or implied. See the License for the | ||
| // specific language governing permissions and limitations | ||
| // under the License. | ||
|
|
||
| #include "core/data_type_serde/orc_timestamp_decode_context.h" | ||
|
|
||
| #include <orc/Type.hh> | ||
|
|
||
| #include "common/check.h" | ||
|
|
||
| namespace doris { | ||
|
|
||
| cctz::time_zone OrcTimestampDecodeContext::timezone_for(const orc::Type& file_type, | ||
| int64_t seconds) const { | ||
| const auto kind = file_type.getKind(); | ||
| DORIS_CHECK(kind == orc::TIMESTAMP || kind == orc::TIMESTAMP_INSTANT); | ||
| // Plain timestamps reconstruct the SDK reader's civil value. Instant-to-DATETIME conversion | ||
| // uses the session zone, which must not follow a plain sibling's stripe writer timezone. | ||
| if (kind == orc::TIMESTAMP && writer_timezone) { | ||
| return writer_timezone(seconds); | ||
| } | ||
| return kind == orc::TIMESTAMP ? reader_timezone : session_timezone; | ||
| } | ||
|
|
||
| } // namespace doris |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.