You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "rohanjain101 (via GitHub)" <gi...@apache.org> on 2023/11/02 23:11:35 UTC

[I] Division with 2 duration types produces unexpected results [arrow]

rohanjain101 opened a new issue, #38566:
URL: https://github.com/apache/arrow/issues/38566

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   ```
   a = pa.array([-5029762611667812000], type=pa.duration("ns"))
   b = pa.array([-3380212011015814000], type=pa.duration("ns"))
   a.compute.divide(a, b)
   <pyarrow.lib.DoubleArray object at 0x00000240237D1A20>
   [
     5.389897862766205e-111
   ]
   ```
   
   Result is expect to be a value > 1, using numpy timedeltas produces expected result:
   
   ```
   np.timedelta64(-5029762611667812000, "ns") / np.timedelta64(-3380212011015814000, "ns")
   1.488002112079437
   ```
   
   
   ### Component(s)
   
   C++, Python


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Division with 2 duration types produces unexpected results [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #38566:
URL: https://github.com/apache/arrow/issues/38566#issuecomment-1848832292

   GH-39158 also fixed this.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Division with 2 duration types produces unexpected results [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #38566: [C++] Division with 2 duration types produces unexpected results
URL: https://github.com/apache/arrow/issues/38566


-- 
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: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org