Fix spilling with $stdDevPop/Samp with large numbers

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • QE 2025-09-01
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Here in accumulator_std_dev.cpp when we're merging spilled results, we find the delta from the previous mean and use it to calculate the std dev per the variance algorithm mentioned in the same file which involves squaring delta. The mean is started as 0 so when the first datapoint is very large squaring delta can lead to delta*delta = nan. 

      I've attached a repro (the pipeline is little weird because I just simplified a fuzzer query).repro_spill.js

            Assignee:
            Ivan Fefer
            Reporter:
            Kristina Znam
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: