Skip to content

Preserve half_float's precision in fields API (backport of #70653)#70888

Merged
nik9000 merged 3 commits intoelastic:7.xfrom
nik9000:fetch_half_float_7_x
Mar 25, 2021
Merged

Preserve half_float's precision in fields API (backport of #70653)#70888
nik9000 merged 3 commits intoelastic:7.xfrom
nik9000:fetch_half_float_7_x

Conversation

@nik9000
Copy link
Copy Markdown
Member

@nik9000 nik9000 commented Mar 25, 2021

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 #70260

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Er. Looks like I made a mistake. I'll reply once I've sorted it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

@nik9000 nik9000 force-pushed the fetch_half_float_7_x branch from d556cc8 to f6c1836 Compare March 25, 2021 19:05
nik9000 added 2 commits March 25, 2021 15:09
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
@nik9000 nik9000 changed the title Preserve half_float's precision in fields API (#70653) Preserve half_float's precision in fields API (backport of #70653) Mar 25, 2021
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.
@nik9000 nik9000 merged commit f668a33 into elastic:7.x Mar 25, 2021
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.

1 participant