Fix DateTimeKind collisions in dictionary encoding and mark INT96 DateTimeKind as Unspecified - #695
Closed
Kuinox wants to merge 2 commits into
Closed
Fix DateTimeKind collisions in dictionary encoding and mark INT96 DateTimeKind as Unspecified#695Kuinox wants to merge 2 commits into
Kuinox wants to merge 2 commits into
Conversation
…now read with DateTimeKind.Unspecified.
Kuinox
marked this pull request as draft
December 28, 2025 18:39
Kuinox
marked this pull request as ready for review
December 28, 2025 18:50
aloneguid
self-requested a review
April 28, 2026 21:25
# Conflicts: # src/Parquet.Test/Types/EndToEndTypeTest.cs # src/Parquet/Encodings/ParquetDictionaryEncoder.cs
aloneguid
added a commit
that referenced
this pull request
May 15, 2026
Owner
|
Hi @Kuinox I've manually merged changes to master as PR was too old to safely merge. Closing this now. Thanks for all the work. |
Contributor
Author
|
No problem, thanks ! |
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.
While I'm trying to fix the DateTime handling, I'm uncovering other bugs.
The one fixed in this PR, is when there are mixed DateTimeKind in a RowGroup.
The DateTime are merged by tick count without taking into account the DateTimeKind.
When the DateTimeKind is local, it represent a local date and while having the same TickCount, it represent another moment of time than an utc DateTime with the same TickCount.
The root cause of the issue, is that .NET DateTime are equal if they have the same TickCount, but different kind.
This PR also change the DateTimeKind we put on decoded DateTime from INT96. They are now Unspecified, instead of UTC. This makes more sense since there is no "IsAdjustedToUTC" flag for thoses.