Investigate multiple unit intervals in date_histogram using java.time #29411
Labels
:Analytics/Aggregations
Aggregations
>enhancement
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
Spilt out from #28432.
This issue is also stalled until #27330 is complete.
Currently if multiple unit intervals (e.g. "2d" as opposed to "1d") are used in the date histogram aggregation we create fixed duration buckets instead of calendar interval buckets. For a 2d interval this means that the buckets represent
2 * 24 * 60 * 60 * 1000 = 172800000 milliseconds
instead of representing two days starting at midnight the first day and ending just before midnight the third day.This is not a great API experience and it would be better for all intervals to be calendar intervals. We have tried this before using Joda time but it was not possible to implement. Very preliminary investigations into java.time seem to suggest there is more of a chance of getting this working so once the move to java.time is complete we should investigate making all intervals in the date_histogram calendar intervals.
The text was updated successfully, but these errors were encountered: