ST_CENTROID_AGG returns POINT(NaN NaN) on empty records #106025
Labels
:Analytics/Geo
Indexing, search aggregations of geo points and shapes
>bug
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
v9.0.0
Elasticsearch Version
8.14
Installed Plugins
No response
Java Version
bundled
OS Version
all
Problem Description
If we aggregate over zero records, we get POINT (NaN NaN). I think the default behaviour in ES|QL is to return null instead of NaN, and in this case a null centroid, not null coordinates.
For example:
Returns:
But should return:
And a warning.
Steps to Reproduce
Create an index with two geo_point fields, but do not add any documents.
Query with:
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: