[C++] Reuse abstraction for null partitions in sorting functions
Describe the enhancement requested
#46926 introduced helper functions which partition a set of indices into three spans for null, nan and non_null_like. @pitrou mentioned the follow-up of consolidating these methods with other partitioning methods in vector_sort_internal.h as it can be confusing to have the same abstraction in the codebase twice.
The current NullPartitionResult structure only distinguished between null and non_null. This limitation is circumvented by storing two partition results, with the additional one distinguishing nan and non_null_like. This workaround should be removed by reusing the new PartitionResultByNullLikeness
Component(s)
C++
Issue resolved by pull request 50248 https://github.com/apache/arrow/pull/50248