When doubleMean aggregate with no data selected, it returns 0. For other aggregation like doubleMax, doubleMin and doubleSum, it returns null.
The later behavior is more aligned to SQL. Could we improve this behavior?
{
"queryType": "groupBy",
"aggregations": [
{
"type": "filtered",
"aggregator": {
"type": "doubleMean",
"name": "_agg",
"fieldName": "metric_value"
},
"filter": {
"type": "expression",
"expression": " 0 "
}
}
],
"dataSource": {
"type": "inline",
"columnNames": ["metric_name", "metric_value"],
"columnTypes": ["STRING", "LONG"],
"rows": [
["test", 1],
["test", 2],
["test", 3],
["test", 4],
["test", 5]
]
},
"intervals": [
"-10000/10000"
],
"granularity": "all",
"dimensions": [
"metric_name"
],
"having": {
"type": "always"
}
}