-
Couldn't load subscription status.
- Fork 3.9k
ARROW-2554: [Python] fix timestamp unit detection from python lists #2118
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2118 +/- ##
==========================================
- Coverage 86.39% 86.38% -0.02%
==========================================
Files 242 230 -12
Lines 41481 40611 -870
==========================================
- Hits 35838 35080 -758
+ Misses 5643 5531 -112
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.
LGTM except the cast.
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.
Use checked_cast<TimestampType&>(*type) here to avoid increasing the reference counter. (checked_cast is an Arrow-defined cast that evaluates to dynamic_cast in debug builds, otherwise it's a static_cast).
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.
If you do that, make sure to use const auto& otherwise I believe the copy constructor will still be invoked
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.
If the scalar type is some other unit (or unitless? can't remember how we're handling that at the moment) then you should raise in an else branch
|
@xhochy ready :) |
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.
+1, LGTM
Thanks!
No description provided.