Preserve half_float's precision in fields API (backport of #70653)#70888
Merged
nik9000 merged 3 commits intoelastic:7.xfrom Mar 25, 2021
Merged
Preserve half_float's precision in fields API (backport of #70653)#70888nik9000 merged 3 commits intoelastic:7.xfrom
nik9000 merged 3 commits intoelastic:7.xfrom
Conversation
nik9000
commented
Mar 25, 2021
Member
Author
There was a problem hiding this comment.
@astefan it looked like the easiest way to get this backport landed was to disable pulling half_float if the you might get back more precision than the test expects. If we could put a Matcher in the map I could assert that it is "close". But we can't put Matchers in the map.
I think this means that for 7.12 we won't be checking half floats. But we check them before 7.12 and after it.
Member
Author
There was a problem hiding this comment.
Er. Looks like I made a mistake. I'll reply once I've sorted it.
Member
Author
There was a problem hiding this comment.
OK. I think I've sorted it. There are a couple of more versions where we skip half float - but only when we send the request to the upgraded node.
d556cc8 to
f6c1836
Compare
This modifies the fields API to return values with half_float's precision. This makes the fields API better reflect what we've indexed which we'd like to to do in general. It does make the values that come back "uglier" because things like `3.14` end up becoming `3.140625`. But that is what is actually in the index so itsmore "real". Closes elastic#70260
I made a mistake in a randomized test in elastic#70653. It didn't trigger on my PRs but the intake caught it. I just misplaced a decimal place.
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.
This modifies the fields API to return values with half_float's
precision. This makes the fields API better reflect what we've indexed
which we'd like to to do in general. It does make the values that come
back "uglier" because things like
3.14end up becoming3.140625. Butthat is what is actually in the index so itsmore "real".
Closes #70260