You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/07/02 13:21:17 UTC

[GitHub] [arrow] nevi-me commented on a change in pull request #7193: ARROW-7924: [Rust] Add sort for float types

nevi-me commented on a change in pull request #7193:
URL: https://github.com/apache/arrow/pull/7193#discussion_r448996735



##########
File path: rust/arrow/src/compute/kernels/sort.rs
##########
@@ -149,9 +167,13 @@ where
         .collect::<Vec<(u32, T::Native)>>();
     let mut nulls = null_indices;
     if !options.descending {
-        valids.sort_by_key(|a| a.1);
+        valids.sort_by(|a, b| a.1.partial_cmp(&b.1).unwrap_or_else(|| Ordering::Greater));

Review comment:
       I haven't, I can try it out when I get a chance, as I'm also curious of what the difference would be




----------------------------------------------------------------
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:
users@infra.apache.org