PyArrow pairwise_diff returns incorrectly signed result
Open
Component: Python
Type: bug
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the bug, including details regarding any error messages, version, and platform.
```
Python 3.11.5 (main, Sep 19 2023, 13:23:14) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyarrow as pa
>>> import pyarrow.compute as pc
>>> a = pa.array([0, 1, 0], type=pa.uint32())
>>> a
[
0,
1,
0
]
>>> pc.pairwise_diff(a)
[
null,
1,
4294967295
]
>>> pa.__version__
'13.0.0'
```
I would have expected the result to be a signed 32 (or 64?) bit array.
### Component(s)
Python
Contributor guide
Assessment
This issue has not been assessed yet.