[C++][Compute] Remove redundant cast kernels
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the enhancement requested
In Arrow's `cpp/src/arrow/compute/kernels/scalar_cast_string.cc`, there are several cast kernels registered for cases where the input and output types are the same, for example:
https://github.com/apache/arrow/blob/73742e82ed771cb7df40789882e220118045123b/cpp/src/arrow/compute/kernels/scalar_cast_string.cc#L643-L658
https://github.com/apache/arrow/blob/73742e82ed771cb7df40789882e220118045123b/cpp/src/arrow/compute/kernels/scalar_cast_string.cc#L472-L487
https://github.com/apache/arrow/blob/73742e82ed771cb7df40789882e220118045123b/cpp/src/arrow/compute/kernels/scalar_cast_string.cc#L772-L780
However, casts between identical types appear to be handled earlier in cast.cc:
https://github.com/apache/arrow/blob/73742e82ed771cb7df40789882e220118045123b/cpp/src/arrow/compute/cast.cc#L101-L127
As a result, it seems these kernels may never be invoked.
### Component(s)
C++
Contributor guide
Assessment
This issue has not been assessed yet.