[C++][Compute] Add quotient and modulo kernels
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
Add a pair of binary kernels to compute the:
- quotient (result after division, discarding any fractional part, a.k.a integer division)
- mod or modulo (remainder after division, a.k.a `%` / `%%` / modulus).
The returned array should have the same data type as the input arrays or promote to an appropriate type to avoid loss of precision if the input types differ.
**Reporter**: [Ian Cook](https://issues.apache.org/jira/browse/ARROW-12755) / @ianmcook
#### Related issues:
- [[C++] Arithmetic kernels for numeric arrays](https://github.com/apache/arrow/issues/28490) (is a child of)
- [[C++] Implement mod compute function](https://github.com/apache/arrow/issues/18751) (is duplicated by)
- [[C++][Compute] Add remainder and quotient compute::Function](https://github.com/apache/arrow/issues/27909) (is related to)
#### PRs and other links:
- [GitHub Pull Request #11116](https://github.com/apache/arrow/pull/11116)
**Note**: *This issue was originally created as [ARROW-12755](https://issues.apache.org/jira/browse/ARROW-12755). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
Contributor guide
Research direction
Start by reviewing pull request #11116 and the related arithmetic-kernel issues, since the issue does not name implementation files or tests. The work is complete when binary quotient and modulo kernels support the stated division semantics and preserve or appropriately promote input data types without loss of precision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100