-
Notifications
You must be signed in to change notification settings - Fork 915
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
Fix overflow for min calculation in strings::from_timestamps #9793
Fix overflow for min calculation in strings::from_timestamps #9793
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-22.02 #9793 +/- ##
================================================
- Coverage 10.49% 10.48% -0.01%
================================================
Files 119 119
Lines 20305 20339 +34
================================================
+ Hits 2130 2133 +3
- Misses 18175 18206 +31
Continue to review full report at Codecov.
|
Please add a more detailed description to this PR since it will appear in the change log at release time. |
rerun tests |
@@ -707,9 +707,9 @@ struct from_timestamp_base { | |||
* scale( 61,60) -> 1 | |||
* @endcode | |||
*/ | |||
__device__ int32_t scale_time(int64_t time, int64_t base) const | |||
__device__ int64_t scale_time(int64_t time, int64_t base) const |
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.
This most certainly would have been avoided if this code used chrono
types directly instead of trying circumvent the types by using integers.
Filed #9812
@gpucibot merge |
This fixes #9790
When converting a timestamp to a String it is possible for the %M min calculation to overflow an int32_t part way through casting. This moves that result to be an int64_t which avoids the overflow issues.