notEvil commented on code in PR #13718:
URL: https://github.com/apache/arrow/pull/13718#discussion_r937598730


##########
cpp/src/arrow/python/datetime.h:
##########
@@ -147,14 +151,25 @@ inline int64_t PyDelta_to_ms(PyDateTime_Delta* 
pytimedelta) {
 }
 
 ARROW_PYTHON_EXPORT
-inline int64_t PyDelta_to_us(PyDateTime_Delta* pytimedelta) {
-  return (PyDelta_to_s(pytimedelta) * 1000000LL +
-          PyDateTime_DELTA_GET_MICROSECONDS(pytimedelta));
+// TODO which PyDeltas do we cover?

Review Comment:
   I'd assume the min/max value of `datetime.timedelta` for us and ns. For us 
its `datetime.timedelta(days=-106751992, seconds=71945, microseconds=224192)` 
to `datetime.timedelta(days=106751991, seconds=14454, microseconds=775807)` and 
if i'm not miscalculating `datetime.timedelta(days=-106752, seconds=763, 
microseconds=145224)` to `datetime.timedelta(days=106751, seconds=85636, 
microseconds=854775)` for ns



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to