Dandandan commented on code in PR #4515:
URL: https://github.com/apache/arrow-datafusion/pull/4515#discussion_r1039721716


##########
datafusion/physical-expr/src/aggregate/tdigest.rs:
##########
@@ -220,13 +220,7 @@ impl TDigest {
     }
 
     fn clamp(v: f64, lo: f64, hi: f64) -> f64 {
-        if v > hi {
-            hi
-        } else if v < lo {
-            lo
-        } else {
-            v
-        }
+        v.clamp(lo, hi)

Review Comment:
   lol  :laughing: 
   You might want to inline this whereever this is used?



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