Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate multiple unit intervals in date_histogram using java.time #29411

Closed
colings86 opened this issue Apr 6, 2018 · 5 comments
Closed
Labels
:Analytics/Aggregations Aggregations >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@colings86
Copy link
Contributor

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.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@polyfractal
Copy link
Contributor

Related #33727

@colings86 colings86 removed the stalled label Oct 15, 2019
@astefan
Copy link
Contributor

astefan commented Oct 15, 2019

@polyfractal now that #27330 is done, could this issue be back on our radar?

@polyfractal
Copy link
Contributor

@astefan Definitely :) Especially since #33727 merged, calendar intervals are "contained" to calendar_interval and it should have less unanticipated impact.

That said I personally have no idea how or if we can do it with java time. But I agree it's something we should look into again.

@rjernst rjernst added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label May 4, 2020
@wchaparro
Copy link
Member

This is not something we plan to implement in the near future in aggregations, and has been superceded by our focus on ESQL. Closing as not planned. If your feel strongly about this one, please let us know.

@wchaparro wchaparro closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

No branches or pull requests

6 participants