Query Information
PPL Command/Query:
source=bounty-types | stats sum(num_field) as total_sum
Expected Result:
When all values are null, sum should return null.
Actual Result:
Returns 0 with HTTP 200.
Dataset Information
Dataset/Schema Type
Index Mapping
{
"mappings": {
"properties": {
"num_field": { "type": "integer" }
}
}
}
Sample Data
[
{ "num_field": null },
{ "num_field": null },
{ "num_field": null }
]
Bug Description
Issue Summary:
SUM on all-null column returns 0 instead of null.
Steps to Reproduce:
- Create index with nullable numeric field.
- Insert only null values for that field.
- Run the query above.
- Observe
total_sum = 0.
Impact:
Aggregation semantics are incorrect and may hide missing-data conditions.
Query Information
PPL Command/Query:
Expected Result:
When all values are null,
sumshould returnnull.Actual Result:
Returns
0with HTTP 200.Dataset Information
Dataset/Schema Type
Index Mapping
{ "mappings": { "properties": { "num_field": { "type": "integer" } } } }Sample Data
[ { "num_field": null }, { "num_field": null }, { "num_field": null } ]Bug Description
Issue Summary:
SUMon all-null column returns0instead ofnull.Steps to Reproduce:
total_sum = 0.Impact:
Aggregation semantics are incorrect and may hide missing-data conditions.