Skip to content

Conversation

@tjwilson90
Copy link
Contributor

fixes #38692

@cbuescher cbuescher added the :Analytics/Aggregations Aggregations label Nov 14, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (:Analytics/Aggregations)

@polyfractal
Copy link
Contributor

@not-napoleon you might have a better handle on this area than me, would you mind reviewing? ❤️

@not-napoleon
Copy link
Member

@elasticmachine test this please

Copy link
Member

@not-napoleon not-napoleon left a comment

Choose a reason for hiding this comment

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

This looks fine to me, but I do wonder if there was some reason we weren't doing this in the first place. @jpountz I think you originally wrote this, do you know of some reason we wouldn't want to try parsing as a long first before falling back to rounding?

expectThrows(IllegalArgumentException.class, () -> DocValueFormat.RAW.parseLong("", randomBoolean(), null));
expectThrows(IllegalArgumentException.class, () -> DocValueFormat.RAW.parseLong("abc", randomBoolean(), null));
expectThrows(IllegalArgumentException.class, () -> DocValueFormat.RAW.parseDouble("", randomBoolean(), null));
expectThrows(IllegalArgumentException.class, () -> DocValueFormat.RAW.parseDouble("abc", randomBoolean(), null));
Copy link
Member

Choose a reason for hiding this comment

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

Nice catch, thanks!

@jpountz
Copy link
Contributor

jpountz commented Nov 14, 2019

@not-napoleon No good reason, this is a true bug. :)

@not-napoleon
Copy link
Member

@elasticmachine run elasticsearch-ci/1

@tjwilson90
Copy link
Contributor Author

The 6.8 branch is still maintained, right? Could this fix be backported to that branch as well please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Precision loss of include/exclude filter values in terms aggregation

8 participants