Add interval response parameter to AutoDateInterval histogram#33254
Merged
pcsanwald merged 6 commits intoelastic:masterfrom Sep 5, 2018
Merged
Add interval response parameter to AutoDateInterval histogram#33254pcsanwald merged 6 commits intoelastic:masterfrom
pcsanwald merged 6 commits intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-search-aggs |
colings86
suggested changes
Aug 30, 2018
Contributor
colings86
left a comment
There was a problem hiding this comment.
@pcsanwald I left a suggestion about how we might be able to achieve this without recalculating the interval int he getter method
| } | ||
| } | ||
| return new DateHistogramInterval(Integer.toString(roundingInfo.innerIntervals[0]) + unitAbbreviation); | ||
| } |
Contributor
There was a problem hiding this comment.
I'm not sure we should calculate the interval here as we could end up with bugs where this is different from the actual interval used. Instead could we have a field for the interval store in this class which is populated int he AutoDateHistogramAggregator.buildAggregation() and also in doReduce() when we build the new instance following a reduce? I think we will have all the information we need in both those places?
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Sep 5, 2018
* master: Fix deprecated setting specializations (elastic#33412) HLRC: split cluster request converters (elastic#33400) HLRC: Add ML get influencers API (elastic#33389) Add conditional token filter to elasticsearch (elastic#31958) Build: Merge xpack checkstyle config into core (elastic#33399) Disable IndexRecoveryIT.testRerouteRecovery. INGEST: Implement Drop Processor (elastic#32278) [ML] Add field stats to log structure finder (elastic#33351) Add interval response parameter to AutoDateInterval histogram (elastic#33254) MINOR+CORE: Remove Dead Methods ClusterService (elastic#33346)
pcsanwald
pushed a commit
to pcsanwald/elasticsearch
that referenced
this pull request
Sep 5, 2018
…c#33254) Adds the interval used to the aggregation response.
Contributor
Author
|
closes #32102 |
pcsanwald
pushed a commit
that referenced
this pull request
Sep 6, 2018
#33437) Adds the interval used to the aggregation response.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The goal of this PR is to add an interval parameter at the top level of the AutoIntervalHistogram. This allows clients to know what interval was used for the aggregation without comparing bucket key values.
The one bit I could use some advice on is the best way to persist this field onto
ParsedAutoDateHistogramfor HL REST client support: it's not clear to me how to add this for a response only field (i.e. one that isn't present on the AggregationBuilder)Here's what the new response looks like: