Closed
Description
Cumulative sum aggregation returns an error when using it with other pipeline aggregations. This happens consistently with both bucket_scripts and derivatives.
Steps to Reproduce:
- Index some Metricbeat data
- Run the following query:
GET metricbeat-*/_search
{
"size": 0,
"query": {
"range": {
"@timestamp": {
"gte": "now-15m/m",
"lte": "now"
}
}
},
"aggs": {
"timeseries": {
"date_histogram": {
"field": "@timestamp",
"interval": "10s"
},
"aggs": {
"maxTX": {
"max": {
"field": "system.network.out.bytes"
}
},
"calculation": {
"bucket_script": {
"buckets_path": {
"maxTX": "maxTX"
},
"script": {
"source": "params.maxTX"
}
}
},
"cumsum": {
"cumulative_sum": {
"buckets_path": "calculation"
}
}
}
}
}
}
- Receive following response:
{
"error": {
"root_cause": [],
"type": "search_phase_execution_exception",
"reason": "",
"phase": "fetch",
"grouped": true,
"failed_shards": [],
"caused_by": {
"type": "null_pointer_exception",
"reason": null
}
},
"status": 503
}