Repository navigation
Fix #3049: apply force_microsecond_precision to TIMESTAMP_NTZ/LTZ(7) - #3050
Open
inchang-ing wants to merge 1 commit into
Open
inchang-ing wants to merge 1 commit into
inchang-ing wants to merge 1 commit into
Conversation
…NTZ/LTZ(7) When force_microsecond_precision is set, TIMESTAMP_NTZ/LTZ columns at scale 7 are sent by the server as a plain int64 (nanosecond units). The int64 branch set the column type to timestamp[us] but still scaled the value up to nanoseconds, producing 1000x-too-large values that raised OverflowError on conversion. Truncate the value to microseconds to match the emitted schema.
Author
|
Gentle ping on this one - it extends |
This branch has not been deployed
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.
Fixes #3049.
When force_microsecond_precision is enabled, TIMESTAMP_NTZ/LTZ columns at scale 7 (sent by the server as a plain int64 of nanosecond units) had their column type set to timestamp[us] but were still scaled up to nanoseconds, yielding 1000x-too-large values that raised OverflowError on conversion. The int64 branch now truncates the value to microseconds to match the emitted schema.
Added a unit regression test (test/unit/test_arrow_force_microsecond_precision.py) covering both TIMESTAMP_NTZ and TIMESTAMP_LTZ at scale 7.