[C++][Python] Floordiv compute kernel
Open
Component: C++
Component: Python
Status: needs champion
Type: enhancement
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the enhancement requested
Python and numpy support floor division, which for integral types, round towards infinity (pa.compute.divide for integral types rounds towards 0). If one of the types if floating point, then floordiv is equivalent to pa.compute.floor(pa.compute.divide), however, if both types are integral, floordiv should round towards infinity instead of 0. To do this currently, requires a combination of multiple compute calls, such as in https://github.com/pandas-dev/pandas/pull/56677. Since python and numpy support this, would be useful to have this logic in an arrow compute kernel.
### Component(s)
C++, Python
Contributor guide
Assessment
This issue has not been assessed yet.