-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(python): Infer time_unit
in pl.duration
when nanoseconds is specified
#14987
feat(python): Infer time_unit
in pl.duration
when nanoseconds is specified
#14987
Conversation
time_unit
in pl.duration
when nanoseconds is specified
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.
Thanks for the PR!
We don't want to infer ms time unit when a millisecond is specified. The logic for inference should be: if no time unit is specified, and if nanosecond is specified, use ns
. Otherwise, use us
.
Please also add a test that showcases this new functionality.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #14987 +/- ##
==========================================
- Coverage 81.21% 81.05% -0.17%
==========================================
Files 1348 1338 -10
Lines 175318 173832 -1486
Branches 2506 2458 -48
==========================================
- Hits 142390 140892 -1498
- Misses 32448 32473 +25
+ Partials 480 467 -13 ☔ View full report in Codecov by Sentry. |
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.
Done with the changes
ed60d83
to
d1ad911
Compare
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.
Thanks!
Closes #14751
@stinodego I hope this is what you meant