Skip to content

Commit

Permalink
fix(stdlib): aggregate window mean and sum work properly with null va…
Browse files Browse the repository at this point in the history
…lues (#4986)

The native aggregate window implementations of mean and sum now properly
work with null values and the mean implementation now uses the mean of
means method of calculation rather than just `sum / count`.

The null values ensures that it properly acts when there are null values
or when the interval is only null values.

The change to use a mean of means method of calculation helps to prevent
infinite values from showing up in the result when the sum overflows
because we keep a mean of each interval with the count so that we can
merge two means.
  • Loading branch information
jsternberg authored Jul 11, 2022
1 parent da12f35 commit 53c90d5
Show file tree
Hide file tree
Showing 4 changed files with 766 additions and 359 deletions.
2 changes: 1 addition & 1 deletion libflux/go/libflux/buildinfo.gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ var sourceHashes = map[string]string{
"stdlib/universe/aggregate_window_max_test.flux": "8ee5d927ef375e7ac3687ea1ea00a0e8add969c31357362d0032ee079c2ac906",
"stdlib/universe/aggregate_window_mean_test.flux": "ba33848419748489bc330c67dfaa344fac757f8af782879c71e08b345f0f652f",
"stdlib/universe/aggregate_window_median_test.flux": "2791ed98310aae23deab7cb79836e60539cd29810c67910c30e4b891356a2698",
"stdlib/universe/aggregate_window_test.flux": "5fb441b250506eeb65b778ee99d4cb0af2bf7cab1ea93c1eb2cd6d101edae198",
"stdlib/universe/aggregate_window_test.flux": "79ae9443c57f613fa7917b727f80f6a3fc985fcd95006ab2804c1f5d25c9b9d3",
"stdlib/universe/cmo_test.flux": "3793f5cf21ae42879d6789cdc36bbcf29ddb99bf16af8a96775a9415fd8d1c09",
"stdlib/universe/columns_test.flux": "fe641e3e747439a15fb2f4a1e4c56da6ad6a75109db4597f1aab806931f881c7",
"stdlib/universe/contains_test.flux": "a1890287ebc1ad6d8c84561f7e0cb725048a1e287f49f5dceac196866a20ee01",
Expand Down
Loading

0 comments on commit 53c90d5

Please sign in to comment.