Tests InternalSingleBucketAggregation subclasses#23388
Merged
nik9000 merged 1 commit intoelastic:masterfrom Mar 1, 2017
Merged
Tests InternalSingleBucketAggregation subclasses#23388nik9000 merged 1 commit intoelastic:masterfrom
nik9000 merged 1 commit intoelastic:masterfrom
Conversation
Adds a common base class for testing subclasses of `InternalSingleBucketAggregation`. They are so similar they call into question the utility of having all of these classes. We maybe could just use `InternalSingleBucketAggregation` in all those cases.... But for now, let's test the classes! Relates to elastic#22278
63 tasks
jimczi
approved these changes
Feb 28, 2017
Contributor
jimczi
left a comment
There was a problem hiding this comment.
Left a minor comment regarding overflow in document counts.
LGTM otherwise
| emptyMap())); | ||
| } | ||
| // we shouldn't use the full long range here since we sum doc count on reduce, and don't want to overflow the long range there | ||
| long docCount = between(0, Integer.MAX_VALUE); |
Contributor
There was a problem hiding this comment.
The comment is not enough, we should protect against overflow so 100 or 200 should be enough ?
Contributor
There was a problem hiding this comment.
docCount is a a long so it's totally fine, sorry.
Member
Author
There was a problem hiding this comment.
I have a funny story to tell you about labels sometime. Remind me the next time we see each other in person.
Member
Author
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.
Adds a common base class for testing subclasses of
InternalSingleBucketAggregation. They are so similar theycall into question the utility of having all of these classes.
We maybe could just use
InternalSingleBucketAggregationinall those cases.... But for now, let's test the classes!
Relates to #22278