Repository navigation
Parquet: write Date/DateTime as date/datetime-like types instead of plain numbers - #70950
Merged
Merged
Conversation
Contributor
|
This is an automated comment for commit 2e8ed37 with description of existing statuses. It's updated for the latest CI running ✅ Click here to open a full report in a separate page Successful checks
|
alexey-milovidov
approved these changes
Oct 24, 2024
Member
|
Tests have to be updated. |
Contributor
Author
|
00900_long_parquet caught a quirk with timezones:
I can't think of any way to improve this. Leaving the quirk as is, changing the test to use explicit 'UTC' in all DateTime/DateTime64 types. I think we should just generally recommend against reading Parquet files with explicit schema that's substantially different from what's in the file, to avoid weird implicit casts like this. |
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.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Parquet output format converts Date and DateTime columns to date/time types supported by Parquet, instead of writing them as raw numbers. DateTime becomes DateTime64(3) (was: UInt32); setting
output_format_parquet_datetime_as_uint32brings back the old behavior. Date becomes Date32 (was: UInt16).Closes #59522
output_format_parquet_datetime_as_uint32brings back the old behavior.All other date/time-like clickhouse types were already handled well:
Date32- passed through, parquet has 32-bit signed date type.DateTime64(n)- converted to ms/us/ns (the only units supported by parquet).Example:
Before:
After: