andygrove commented on a change in pull request #7193:
URL: https://github.com/apache/arrow/pull/7193#discussion_r425993804
##########
File path: rust/arrow/src/compute/kernels/sort.rs
##########
@@ -283,6 +285,30 @@ mod tests {
None,
vec![3, 1, 4, 2, 0, 5],
);
+ test_sort_to_indices_primitive_arrays::<Float32Type>(
+ vec![
+ None,
+ Some(-0.05),
+ Some(2.225),
+ Some(-1.01),
+ Some(-0.05),
+ None,
+ ],
+ None,
+ vec![3, 1, 4, 2, 0, 5],
+ );
+ test_sort_to_indices_primitive_arrays::<Float64Type>(
+ vec![
+ None,
+ Some(-0.05),
+ Some(2.225),
+ Some(-1.01),
+ Some(-0.05),
+ None,
Review comment:
I can look at this in more detail over the weekend but I think having
special impl for f32/f64 is probably the way to go, then you can add specific
checks for `f32::NAN` and `f64::NAN` before calling `partial_cmp` and we'll
need to decide if `NaN` comes before or after valid numbers.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]