Skip to content

Conversation

@tlrx
Copy link
Member

@tlrx tlrx commented May 10, 2017

This pull request adds the parsing logic to InternalRange, InternalDateRange and InternalGeoDistance aggregations.

Copy link
Member

@javanna javanna left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

Choose a reason for hiding this comment

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

nit: == false?

@javanna javanna requested a review from cbuescher May 10, 2017 16:05
Copy link
Member

@cbuescher cbuescher left a comment

Choose a reason for hiding this comment

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

Looks good, but I found two edge cases around the range to/from value that might not be covered by tests yet and that might not be working as expected yet. Not entirely sure, but maybe worth taking another close look.

Copy link
Member

Choose a reason for hiding this comment

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

This should probably be initialized to Double.NEGATIVE_INFINITY. If InternalRange.from is infinite, the "from" field won't be rendered in the xContent and I think the current parser would leave from == 0 in this case. Maybe we should also add tests for those edge cases.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's right, thanks! I added some random ranges with infinity values to the test.

Copy link
Member

Choose a reason for hiding this comment

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

Same here but with Double.POSITIVE_INFINITY?

@tlrx tlrx force-pushed the add-parsing-for-range-aggs branch from 0879dbf to 13c2d12 Compare May 12, 2017 14:27
@tlrx
Copy link
Member Author

tlrx commented May 12, 2017

@cbuescher I updated the code. Can you please have another look? Thanks

Copy link
Member

@cbuescher cbuescher left a comment

Choose a reason for hiding this comment

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

LGTM

@tlrx tlrx merged commit b9d2ecc into elastic:feature/client_aggs_parsing May 12, 2017
@tlrx
Copy link
Member Author

tlrx commented May 12, 2017

Thanks @cbuescher @javanna

@tlrx tlrx deleted the add-parsing-for-range-aggs branch May 12, 2017 14:58
javanna pushed a commit to javanna/elasticsearch that referenced this pull request May 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants