Skip to content

Aggregations Refactor: Refactor Range Aggregations#15399

Merged
colings86 merged 1 commit intoelastic:feature/aggs-refactoringfrom
colings86:refactor/rangeAgg
Dec 14, 2015
Merged

Aggregations Refactor: Refactor Range Aggregations#15399
colings86 merged 1 commit intoelastic:feature/aggs-refactoringfrom
colings86:refactor/rangeAgg

Conversation

@colings86
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a good alternative to propose but wish we did not have to add this public method to Cidrs solely for testing purposes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we keep it here, maybe we should at least require an address that is valid for the given mask like cidrMaskToMinMax expects?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the reason for this method was so I could take a random IP address and a random networkMask and turn them into an appropriate CIDR. I'm not sure how to do that without either having this method or recreating a lot of the logic in this class in the test?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed that's what I said I don't have a good alternative so let's keep it. But can we make it less lenient and expect an ip address that is compatible with the mask and move the - (ipAddress & (blockSize - 1)) part to the ipv4 range tests?

@jpountz
Copy link
Copy Markdown
Contributor

jpountz commented Dec 14, 2015

I left two minor comments but it looks good to me otherwise.

@colings86 colings86 merged commit 5513a76 into elastic:feature/aggs-refactoring Dec 14, 2015
@colings86 colings86 deleted the refactor/rangeAgg branch December 14, 2015 13:24
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Search Refactoring labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/Aggregations Aggregations :Search/Search Search-related issues that do not fall into other categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants