ExtendedStatsBuckets gives negative variance

Elasticsearch v. 6.2.4

ExtendedStats over a negative field in a DateHistogram gives a negative variance, and NaN for standard deviation. I believe this is a bug since variance should never be negative as it is derived from a squared value.

This is what the response looks like:

{  
    "name":"burndown_stats",
    "count":39,
    "min":-9.4948557E7,
    "max":-9.4948557E7,
    "sum":-3.702993723E9,
    "avg":-9.4948557E7,
    "sumOfSquares":3.5159391057890765E17,
    "variance":-1.641025641025641,
    "stdDeviation":"NaN",
    "type":"extended_stats_bucket",
    "stdDeviationAsString":"NaN",
    "sumOfSquaresAsString":"3.5159391057890765E17",
    "varianceAsString":"-1.641025641025641",
    "minAsString":"-9.4948557E7",
    "maxAsString":"-9.4948557E7",
    "avgAsString":"-9.4948557E7",
    "sumAsString":"-3.702993723E9",
    "metaData":null,
    "fragment":true
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.