-
Notifications
You must be signed in to change notification settings - Fork 901
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
Add days check to cudf::is_timestamp using cuda::std::chrono classes #7028
Add days check to cudf::is_timestamp using cuda::std::chrono classes #7028
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-0.18 #7028 +/- ##
===============================================
+ Coverage 82.09% 82.11% +0.01%
===============================================
Files 97 97
Lines 16477 16477
===============================================
+ Hits 13527 13530 +3
+ Misses 2950 2947 -3
Continue to review full report at Codecov.
|
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.
That was a quick application of a talk!
Looks good, posted a tentative suggestion.
@@ -84,7 +84,7 @@ std::unique_ptr<column> to_timestamps( | |||
* | :-------: | ----------- | | |||
* | \%d | Day of the month: 01-31 | | |||
* | \%m | Month of the year: 01-12 | | |||
* | \%y | Year without century: 00-99 | | |||
* | \%y | Year without century: 00-99. [0,68] maps to [2000,2068] and [69,99] maps to [1969,1999] | |
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.
We could add a %C
format string to specify the century like std::chrono::parse
: https://en.cppreference.com/w/cpp/chrono/parse
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.
Reference #5991
Closes #6774
This PR adds a check for a valid day value for a year/month (if these are specified in the format) in the
cudf::is_timestamp()
API. Also, a chunk of messy year/month/day logic in a related functor was replaced with libcu++ implementation of theyear_month_day()
function instead.A gtest is also updated to include to test for an invalid day.