-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Refactor extendedBounds to use DoubleBounds #60556
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
Conversation
Refactors extendedBounds to use DoubleBounds instead of 2 variables. This is a follow up for elastic#59175
|
Pinging @elastic/es-analytics-geo (:Analytics/Aggregations) |
not-napoleon
left a comment
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. Thanks for cleaning this up.
| if (minDocCount == 0) { | ||
| emptyBucketInfo = new EmptyBucketInfo(interval, offset, minBound, maxBound, buildEmptySubAggregations()); | ||
| emptyBucketInfo = new EmptyBucketInfo(interval, offset, | ||
| extendedBounds == null || extendedBounds.getMin() == null ? Double.POSITIVE_INFINITY : extendedBounds.getMin(), |
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.
Nit: Could we provide a default DoubleBounds(null, null) in the constructor, and then just call DoubleBounds#effectiveMin here? (ditto for max and the below usage). Especially since the logic for what to use for undefined is a little arbitrary (e.g. it's not obvious at a glance why we use POSITIVE_INFINITY instead of NAN), I'd rather just keep that logic in one place if possible.
Refactors extendedBounds to use DoubleBounds instead of 2 variables. This is a follow up for elastic#59175
Refactors extendedBounds to use DoubleBounds instead
of 2 variables.
This is a follow up for #59175