-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Interval field on DateHistograms will be deprecated #27410
Comments
Pinging @elastic/kibana-app |
Note: this merged into master, backport for 7.x is in-progress. I'll update when that lands as well. |
Pinging @elastic/es-ui |
Pinging @elastic/stack-monitoring |
Final note, elastic/elasticsearch#41906 just merged into 7.x and backporting is now done on the ES side. |
Update: We currently have plans to provide a utility function that autodetects this into the new data core plugin, which all teams can use. I'll update here (and via mail) once this is available. |
I'm not quite sure I understand how this works.
You're saying |
This is correct. In the code, there's a map of "calendar" units and it literally looks to see if the supplied interval is one of the accepted calendar units ( If the map doesn't contain the specified interval, it is assumed to be "fixed" and tries to parse it with the allowed non-calendar units. If this parsing works, fixed time rounding is used for the rest of the date math. If that parsing fails, it throws an exception (either because the unit is an illegal fixed time like This is why we wanted explicit fields to disambiguate. Having two distinctly different behaviors overlapping with the same set of semi-shared syntax is complicated and confusing to everyone :) |
I don't think it's exactly related, but do you know if this interval is also affected by this change? |
@chrisronline No, I don't think so. Should only affect things that touch the |
I will be closing this issue since all linked TODOs are done. If any team still is using |
Today, Elasticsearch's
date_histogram
aggregation'sinterval
field supports both "fixed" and "calendar" time simultaneously, choosing between the two depending on the interval's syntax (e.g.1d
is calendar,2d
is fixed). This is super confusing for users even if they read the documentation, and a very subtle bug for everyone else because intervals don't always work as they expect.Elasticsearch is working on a PR to deprecate this functionality, and replace it with two explicit fields:
fixed_interval
andcalendar_interval
. This way the user knows exactly what they are getting.The plan as it stands today:
fixed_interval
/calendar_interval
fields todate_histogram
aggregation.interval
field in 7.0+interval
field in 8.0More details can be found in the PR itself (elastic/elasticsearch#33727) but I wanted to open an issue in Kibana to track the deprecation since it'll affect anything touching a date histo.
Note: we're targeting 7.0, but there's no requirement it has to make 7.0 so it could slip to 7.x
TODOs
The text was updated successfully, but these errors were encountered: