Native support for stddev and variance related window functions - #3061
Conversation
|
@fulghum DOLT
|
|
c75133c to
ca32904
Compare
|
SummaryCoverage spans aggregate variance and standard-deviation behavior across numeric and floating-point inputs, grouped and moving-window calculations, null and empty-frame handling, duplicate ordering values, concurrent startup, precision limits, and recovery after extreme values. The broad results are healthy for ordinary use and many boundary conditions, but an extreme floating-point input exposes an incorrect result. Not safe to merge yet — the PR introduces a medium-severity correctness defect in grouped and window aggregates for extreme real-valued inputs, where finite variance can become NaN. Ordinary and double-precision cases remain healthy, but this is a direct, user-visible data-result error in the changed functionality rather than a test-environment issue. Tests run by ItoTip Reply with @itoqa to send us feedback on this test run. |
…tly wrapping, and add regression tests for out-of-range casts plus variance/stddev aggregates over REAL columns.
|
Diff SummaryCoverage focused on safe handling of floating-point and numeric values across normal boundary cases and adversarial oversized inputs. It exercised successful storage and calculation, clear rejection of invalid values, preservation of existing data, and continued connection usability after errors. Safe to merge — the exercised behaviors completed without any PR-attributable regressions or new failures, including overflow rejection, boundary handling, data preservation, and recovery after errors. Previously passing aggregate, null-handling, precision, and window-function areas were not exercised in this run and remain a flag for later, not a merge blocker. Tests run by Ito
Tip Reply with @itoqa to send us feedback on this test run. |
Hydrocharged
left a comment
There was a problem hiding this comment.
You know I like my function comments, but LGTM otherwise!
cd105ea to
dde8643
Compare
|
Diff SummaryCoverage spans aggregate and window calculations across integer, exact-number, and floating-point inputs, including result types, grouping, ordering, peer handling, and frame behavior. It also exercises edge and recovery cases such as NULL-heavy or empty inputs, one-value thresholds, invalid values, overflow-style errors, and continued database usability after failures. Safe to merge — the exercised behavior is consistently healthy, with no regressions or PR-attributable failures identified. Previously passing overflow and boundary scenarios were not rerun, but they are a flag for later rather than a merge blocker based on this run. Tests run by Ito
Tip Reply with @itoqa to send us feedback on this test run. |
|
Diff SummaryThe run covered core statistical calculations for numeric and floating-point data, including population and sample results, standard deviation, grouped and partitioned windows, and peer-aware frame behavior. It also exercised edge conditions such as nulls, single rows, duplicate values, very large or nearly equal numbers, non-finite values, and recovery after problematic queries, with healthy results throughout. Safe to merge — the exercised calculations and edge-case behaviors showed no regressions or new failures attributable to this PR. Previously passing overflow and boundary scenarios were not rerun, so they remain a flag for later rather than a merge blocker. Tests run by Ito
Tip Reply with @itoqa to send us feedback on this test run. |


Fixed a bug where
STDDEV_POP,STDDEV_SAMP,VAR_POP,VAR_SAMP, and theirvarianceandstddevaliases would crash the server when used as window functions over integer columns. They now return correct, Postgres-compatible numeric/double precision results instead of panicking.Fixes: #3038