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

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   In the example below, `arr2` and `arr3` are duration arrays with a single 
null element. 
   
   `arr2` is constructed from a list
   `arr3` is constructed from a numpy array
   
   Once constructed, they evaluate to being equal. 
   
   However, they exhibit different behavior once passed to 
`pyarrow.compute.subtract_checked`:
   
   ```
   import pyarrow as pa
   import pyarrow.compute as pc
   import numpy as np
   
   data1 = [86400000000]
   data2 = [None]
   data3 = np.array([None], dtype="timedelta64[ns]")
   
   arr1 = pa.array(data1, type=pa.duration("ns"))
   arr2 = pa.array(data2, type=pa.duration("ns"))
   arr3 = pa.array(data3, type=pa.duration("ns"))
   
   assert arr2 == arr3
   
   pc.subtract_checked(arr1, arr2)  # ok
   pc.subtract_checked(arr1, arr3)  # ArrowInvalid: overflow 
   ```
   
   ### Component(s)
   
   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: [email protected]

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

Reply via email to