stats
and extended_stats
aggregation unexpectedly fails with "Cannot format stat [max] with format ..."
#113811
Labels
:Analytics/Aggregations
Aggregations
>bug
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
Elasticsearch Version
8.15.2
Installed Plugins
No response
Java Version
bundled
OS Version
Linux 5.15.102-1-pve #1 SMP PVE 5.15.102-1 (2023-03-14T13:48Z) x86_64 GNU/Linux
Problem Description
We recently upgraded from 8.12.2 to 8.15.2 and started to receive errors in a query with
stats
andextended_stats
aggregations:Yet, a simple
max
aggregation on the same dataset returns the expected result:And a
min
aggregation shows there is no negative timestamp in this dataset:Here is the relevant part of the index mappings:
I think it might have been introduced by #107678 in 8.14.0.
Steps to Reproduce
As you can see, I was not able to reproduce using a simplified dataset extracted from production that contains only the
recorded_at
field. Our production dataset that is experiencing the issue is 22 GB. I haven't yet found a way to reproduce the error with a smaller dataset I could share here.The reason I thought it might be a bug is that the same query used to work before we upgraded from 8.12. It's possible there is an issue within our dataset and the query used to ignore it before validation was introduced in 8.14.0, but I wasn't able to find any negative timestamp in the entire dataset, using a
min
aggregation with no filter. The error message with the large negative value makes me think it might be a bug.I am not sure how I could troubleshoot this further to pinpoint the data causing the problem.
Thank you!
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: