alamb commented on code in PR #19099:
URL: https://github.com/apache/datafusion/pull/19099#discussion_r2594051826
##########
datafusion/functions-aggregate-common/src/tdigest.rs:
##########
@@ -744,4 +748,22 @@ mod tests {
assert_eq!(t.size(), 96);
}
+
+ #[test]
+ fn test_identical_values_floating_point_precision() {
Review Comment:
I ran this test on my (mac) without the code change I verified it fails
```
thread 'tdigest::tests::test_identical_values_floating_point_precision'
(9627513) panicked at
/Users/andrewlamb/.rustup/toolchains/1.91.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/num/f64.rs:1413:9:
min > max, or either was NaN. min = 15.699999988079075, max =
15.699999988079073
stack backtrace:
```
I also double checked the original query it is good now:
```shell
DataFusion CLI v51.0.0
> select approx_percentile_cont(0.99) within group (order by value) from
(select 15.699999988079073 as value from generate_series(1,215));
+---------------------------------------------------------------------------+
| approx_percentile_cont(Float64(0.99)) WITHIN GROUP [value ASC NULLS LAST] |
+---------------------------------------------------------------------------+
| 15.699999988079075 |
+---------------------------------------------------------------------------+
1 row(s) fetched.
Elapsed 0.035 seconds.
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]