This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new b9bbee2  ARROW-9413: [Rust] Disable cpm_nan clippy error
b9bbee2 is described below

commit b9bbee2511300d39b3f327fa4dd608648d5bde59
Author: Neville Dipale <nevilled...@gmail.com>
AuthorDate: Sun Jul 12 17:59:48 2020 -0500

    ARROW-9413: [Rust] Disable cpm_nan clippy error
    
    Using the comparison recommended by clippy makes sorts with `NAN` 
undeterministic.
    We currently sort NAN separately to nulls, we couldcan resolve this 
separately
    
    Closes #7710 from nevi-me/ARROW-9413
    
    Authored-by: Neville Dipale <nevilled...@gmail.com>
    Signed-off-by: Wes McKinney <w...@apache.org>
---
 rust/arrow/src/compute/kernels/sort.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/rust/arrow/src/compute/kernels/sort.rs 
b/rust/arrow/src/compute/kernels/sort.rs
index 8cd6f7b..2b4cbbc 100644
--- a/rust/arrow/src/compute/kernels/sort.rs
+++ b/rust/arrow/src/compute/kernels/sort.rs
@@ -52,12 +52,14 @@ pub fn sort_to_indices(
             .as_any()
             .downcast_ref::<Float32Array>()
             .expect("Unable to downcast array");
+        #[allow(clippy::cmp_nan)]
         range.partition(|index| array.is_valid(*index) && array.value(*index) 
!= f32::NAN)
     } else if values.data_type() == &DataType::Float64 {
         let array = values
             .as_any()
             .downcast_ref::<Float64Array>()
             .expect("Unable to downcast array");
+        #[allow(clippy::cmp_nan)]
         range.partition(|index| array.is_valid(*index) && array.value(*index) 
!= f64::NAN)
     } else {
         range.partition(|index| values.is_valid(*index))

Reply via email to