GH-43017: [C++] Make the set of casts and hash kernels involving float16 consistent with other floating types
Rationale for this change
To simplify loops and unit tests involving numeric types. Special-casing float16 adds complexity.
What changes are included in this PR?
- Complete the set of casts involving half-float casts (with the exception of half-float -> decimal128/256 casts)
- Make half-floats supported in hash kernels (kernels defined in terms of the equality of physical representation of values)
Are these changes tested?
By existing tests that are now extended to run with float16 as input.
- GitHub Issue: #43017
:warning: GitHub issue #43017 has been automatically assigned in GitHub to PR creator.
@ianmcook @ClifHouck
@pitrou
@felipecrv Do we have tests for sorting float16 values and NaNs already? Otherwise, we should add some.
Also, is only array_sort handled, or does the more general sort also accept float16?
@felipecrv Is this ready for review again?
@felipecrv Is this ready for review again?
No. Adding these tests you requested creates a cascade of requirements regarding half-float support that I haven't been able to fix even after putting a lot of effort into it.