Commit 48b8c13
authored
fix: Fix stddev indeterministically producing NAN (apache#13248)
In the VarianceGroupAccumulator we were missing a `count == 0` check
that is present in the normal Accumulator. This mostly does not matter
except for the case where the first state to be merged has `count == 0`
then the `merge` function will incorrectly calculate a new m2 of NAN
which will propagate to the final result.
This fixes the bug bu adding the missing `count == 0` check.1 parent 003813a commit 48b8c13
1 file changed
+33
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
| |||
573 | 574 | | |
574 | 575 | | |
575 | 576 | | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
576 | 580 | | |
577 | 581 | | |
578 | 582 | | |
| |||
612 | 616 | | |
613 | 617 | | |
614 | 618 | | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
0 commit comments