fn sort_impl<T: Copy>( options: SortOptions, valids: &mut [(u32, T)], nulls: &[u32], limit: Option<usize>, cmp: impl FnMut(T, T) -> Ordering, ) -> Vec<u32>