GH-38558: [C++] Add support for null sort option per sort key
Rationale for this change
support multi sortkey nulls first.
order by i nulls first, j, k nulls first;
The current null sorting only supports all sortkeys, not a certain sortkey, so NullPlacement is extended to the SortKey field. Since the underlying framework is very well written, when modifying this function, you only need to pass the null_placement of each SortKey in. That’s it.
What changes are included in this PR?
1.SortKey structure, NullPlacemnt transfer logic, sorting logic and Ording related, test related 2.Substriait related. 3.c_glib related. 4.SelectK related. 5.RankOptions related.
Are these changes tested?
yes, I changed the code inside vector_sort_test.cc and performed additional tests.
Are there any user-facing changes?
yes, pg database include null sorting of multiple sort keys.
- Closes: #38558
:warning: GitHub issue #38558 has been automatically assigned in GitHub to PR creator.
Fixes #38633, Fixes #38558
This PR is ready, all tests have passed, and four of them failed seem to have nothing to do with this submission. @kou @westonpace
What is the status on this?