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 2022/11/09 18:28:48 UTC

[GitHub] [arrow-datafusion] comphead commented on a diff in pull request #4133: Use f64::total_cmp instead of OrderedFloat

comphead commented on code in PR #4133:
URL: https://github.com/apache/arrow-datafusion/pull/4133#discussion_r1018282662


##########
datafusion/physical-expr/src/aggregate/tdigest.rs:
##########
@@ -788,10 +728,7 @@ mod tests {
 
         for _ in 1..=100 {
             let t = TDigest::new(100);
-            let values: Vec<_> = (1..=1_000)
-                .map(f64::from)
-                .map(|v| OrderedFloat::from(v as f64))
-                .collect();
+            let values: Vec<_> = (1..=1_000).map(f64::from).map(|v| v as f64).collect();

Review Comment:
   Done



##########
datafusion/physical-expr/src/aggregate/tdigest.rs:
##########
@@ -766,13 +711,8 @@ mod tests {
     #[test]
     fn test_merge_unsorted_against_skewed_distro() {
         let t = TDigest::new(100);
-        let mut values: Vec<_> = (1..=600_000)
-            .map(f64::from)
-            .map(|v| OrderedFloat::from(v as f64))
-            .collect();
-        for _ in 0..400_000 {
-            values.push(OrderedFloat::from(1_000_000_f64));
-        }
+        let mut values: Vec<_> = (1..=600_000).map(f64::from).map(|v| v as f64).collect();

Review Comment:
   Done



##########
datafusion/physical-expr/src/aggregate/tdigest.rs:
##########
@@ -748,10 +696,7 @@ mod tests {
     #[test]
     fn test_merge_unsorted_against_uniform_distro() {
         let t = TDigest::new(100);
-        let values: Vec<_> = (1..=1_000_000)
-            .map(f64::from)
-            .map(|v| OrderedFloat::from(v as f64))
-            .collect();
+        let values: Vec<_> = (1..=1_000_000).map(f64::from).map(|v| v as f64).collect();

Review Comment:
   Done



-- 
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-unsubscribe@arrow.apache.org

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