Allow reading INT96 timestamps generated by AWS wrangler#22854
Merged
raunaqmorarka merged 2 commits intotrinodb:masterfrom Jul 30, 2024
Merged
Allow reading INT96 timestamps generated by AWS wrangler#22854raunaqmorarka merged 2 commits intotrinodb:masterfrom
raunaqmorarka merged 2 commits intotrinodb:masterfrom
Conversation
Adjust for timeOfDayNanos values outside the range of [0, NANOSECONDS_PER_DAY]
findepi
reviewed
Jul 29, 2024
|
|
||
| public static DecodedTimestamp decodeInt96Timestamp(long timeOfDayNanos, int julianDay) | ||
| { | ||
| verify(timeOfDayNanos >= 0 && timeOfDayNanos < NANOSECONDS_PER_DAY, "Invalid timeOfDayNanos: %s", timeOfDayNanos); |
Member
Author
There was a problem hiding this comment.
That PR was removing validation from io.trino.plugin.base.type.DecodedTimestamp#DecodedTimestamp constructor too which we want to avoid. I don't think that PR attempted anything another than just removing validation.
findepi
approved these changes
Jul 29, 2024
|
|
||
| // int96_timestamps_nanos_outside_day_range.parquet file is prepared with timeOfDayNanos values which are | ||
| // outside the [0, NANOSECONDS_PER_DAY] range to simulate data generated by AWS wrangler. | ||
| // https://github.com/aws/aws-sdk-pandas/issues/592#issuecomment-920716270 |
Member
There was a problem hiding this comment.
that comment suggests it might be a bug in pyarrow.
Will it be fixed there?
Member
Author
There was a problem hiding this comment.
I believe it's tackled by providing a flag to make awswrangler stop writing int96 timestamps
aws/aws-sdk-pandas#592 (comment)
wr.s3.to_parquet(..., pyarrow_additional_kwargs={"use_deprecated_int96_timestamps"=False})
mayankvadariya
approved these changes
Jul 29, 2024
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.
Description
Adjust for timeOfDayNanos values outside the range of [0, NANOSECONDS_PER_DAY]
Additional context and related issues
Fixes the problem identified in #19169 and aws/aws-sdk-pandas#592 (comment)
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text: