alamb commented on a change in pull request #1487:
URL: https://github.com/apache/arrow-rs/pull/1487#discussion_r835886158



##########
File path: arrow/src/array/ord.rs
##########
@@ -225,6 +225,11 @@ pub fn build_compare(left: &dyn Array, right: &dyn Array) 
-> Result<DynComparato
                 }
             }
         }
+        (Decimal(_, _), Decimal(_, _)) => {
+            let left: DecimalArray = DecimalArray::from(left.data().clone());
+            let right: DecimalArray = DecimalArray::from(right.data().clone());
+            Box::new(move |i, j| left.value(i).cmp(&right.value(j)))

Review comment:
       What if the `precision` and `scale` of `left` and `right` are not the 
same? In that case I don't think calling `cmp` on the value is correct
   
   If `precision` and `scale`  are always the same, maybe we can add an 
`assert_eq!` to make that clear




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to