jorgecarleitao commented on a change in pull request #9291:
URL: https://github.com/apache/arrow/pull/9291#discussion_r562432512



##########
File path: rust/arrow/src/array/ord.rs
##########
@@ -66,7 +68,9 @@ where
 {
     let left = left.as_any().downcast_ref::<PrimitiveArray<T>>().unwrap();
     let right = right.as_any().downcast_ref::<PrimitiveArray<T>>().unwrap();
-    Box::new(move |i, j| cmp_nans_last(&left.value(i), &right.value(j)))
+    let left = left.values();
+    let right = right.values();
+    Box::new(move |i, j| cmp_nans_last(&left[i], &right[j]))

Review comment:
       this will be slower, but at this point we have no guarantee that `i` and 
`j` are within bounds.




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


Reply via email to