-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[MINOR] Fix logical timestamp issue #14315
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
Draft
linliu-code
wants to merge
9
commits into
apache:branch-0.x
Choose a base branch
from
linliu-code:branch-0.x
base: branch-0.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+2,198
−65
Conversation
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
1905a37 to
3efea4c
Compare
3efea4c to
c817b81
Compare
f94ef98 to
9ab9a1e
Compare
1c14290 to
b9c9333
Compare
0818bd3 to
4850db0
Compare
linliu-code
commented
Nov 24, 2025
| public abstract MessageType convert(Schema schema); | ||
|
|
||
| public abstract Schema convert(MessageType schema); | ||
| } No newline at end of file |
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to add the extra empty line.
linliu-code
commented
Nov 24, 2025
| } | ||
|
|
||
| private void logicalAssertions(Schema tableSchema, String tableBasePath, Map<String, String> hudiOpts, int tableVersion) { | ||
| if (tableVersion > 8) { |
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could remove these >8 statements since they will not be executed at all.
4850db0 to
5d8d587
Compare
579964e to
c620f31
Compare
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.
Change Logs
In PR #9743, the InternalSchema has only one
timestamplogical type that representstimestamp-micros, such that the logical type system was unable to represent columns that should be of logical typetimestamp-millis. That means, when a column is oftimestamp-millistype, and its value was treated as microseconds, which caused data corruptions.PR #13711 introduced a more complete logical type system to handle schema evolution for column stats, which fixes the logical timestamp issue by introducing multiple logical timestamp types, like
timestamp-millis,timestamp-micros,local-timestamp-millisandlocal-timestamp-micros.For branch-0.x, we aim to fix the logical timestamp issue instead of the entire logical systems introduced in #13711.
In this PR, we fix the logical timestamp related issue by picking the relevant changes from #13711, and excluding irrelevant changes from this PR.
Impact
Medium.
Risk level (write none, low medium or high below)
Medium.
Documentation Update
Contributor's checklist