-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Fix sneaky date_histogram bug #65707
Merged
Merged
Conversation
This file contains 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
`date_histogram` has a bug with `offset` and `extended_bounds` when it needs to create an "empty" aggregation result: it includes the bounds twice! Wooops! I broke this a while back when I started trying to merge `offset` into `Rounding`. I never finished that merge, sadly. Interestingly, we've discovered that the merge is required to properly handle daylight savings time (elastic#56305) but it isn't really something we're looking to solve today. For now, this just stops counting the offset twice. Closes elastic#65624
Pinging @elastic/es-analytics-geo (Team:Analytics) |
not-napoleon
approved these changes
Dec 3, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -1235,6 +1235,19 @@ public void testIllegalInterval() throws IOException { | |||
assertWarnings("[interval] on [date_histogram] is deprecated, use [fixed_interval] or [calendar_interval] in the future."); | |||
} | |||
|
|||
public void testBuildEmpty() throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test needs a comment; it's a subtle bug, and it's not super clear how this test catches it.
nik9000
added a commit
to nik9000/elasticsearch
that referenced
this pull request
Dec 7, 2020
`date_histogram` has a bug with `offset` and `extended_bounds` when it needs to create an "empty" aggregation result: it includes the bounds twice! Wooops! I broke this a while back when I started trying to merge `offset` into `Rounding`. I never finished that merge, sadly. Interestingly, we've discovered that the merge is required to properly handle daylight savings time (elastic#56305) but it isn't really something we're looking to solve today. For now, this just stops counting the offset twice. Closes elastic#65624
nik9000
added a commit
that referenced
this pull request
Dec 7, 2020
`date_histogram` has a bug with `offset` and `extended_bounds` when it needs to create an "empty" aggregation result: it includes the bounds twice! Wooops! I broke this a while back when I started trying to merge `offset` into `Rounding`. I never finished that merge, sadly. Interestingly, we've discovered that the merge is required to properly handle daylight savings time (#56305) but it isn't really something we're looking to solve today. For now, this just stops counting the offset twice. Closes #65624 * Fixup
nik9000
added a commit
to nik9000/elasticsearch
that referenced
this pull request
Dec 8, 2020
After backporting elastic#65707 we can now run it in our backwards compatibility tests.
nik9000
added a commit
that referenced
this pull request
Dec 8, 2020
After backporting #65707 we can now run it in our backwards compatibility tests.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Analytics/Aggregations
Aggregations
>bug
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
v7.11.0
v8.0.0-alpha1
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.
date_histogram
has a bug withoffset
andextended_bounds
when itneeds to create an "empty" aggregation result: it includes the bounds
twice! Wooops!
I broke this a while back when I started trying to merge
offset
intoRounding
. I never finished that merge, sadly. Interestingly, we'vediscovered that the merge is required to properly handle daylight
savings time (#56305) but it isn't really something we're looking to
solve today. For now, this just stops counting the offset twice.
Closes #65624