jhorstmann opened a new issue, #1941:
URL: https://github.com/apache/arrow-rs/issues/1941

   **Describe the bug**
   
   Single column `sort_to_indices` uses the total order relation: 
https://github.com/apache/arrow-rs/blob/d52be30f779240b7aa621ebee5d5a6d942445be0/arrow/src/compute/kernels/sort.rs#L203
   
   Lexicographical comparison uses a custom comparator that puts any NaN last: 
https://github.com/apache/arrow-rs/blob/d52be30f779240b7aa621ebee5d5a6d942445be0/arrow/src/array/ord.rs#L70
   
   These could give different results for negative NaN values.
   
   **To Reproduce**
   
   I'll try to come up with a test that shows differing behavior.
   
   **Expected behavior**
   
   Sorting behavior should be the same for both kernels.
   
   Ideally also min/max kernels should use the same ordering, but that gets 
more difficult to implement generically with the simd kernels.
   
   **Additional context**
   
   


-- 
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.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to