sum aggregation in single shard of index for long field type precision problem #50503
Labels
:Analytics/Aggregations
Aggregations
>enhancement
:Search/Search
Search-related issues that do not fall into other categories
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
Team:Search
Meta label for search team
Elasticsearch version:
6.3.1, 7.5.1
Plugins installed: []
JVM version (
java -version
):12.0.2
OS version (
uname -a
if on a Unix-like system):Debian 4.14.81.bm.15
Description of the problem including expected versus actual behavior:
In a single shard of index, when doing a simple sum aggregation for a
long
mapping type field, if the sum result is huge, it will loose the precision.Elasticsearch sum aggregation use
double
to sum the value with kahan summation inSumAggregator
, whencorrected
is very small in contrast tosum
, then thedouble newSum = sum + corrected;
will loose the precision, even though the field mapping type of index islong
.The text was updated successfully, but these errors were encountered: