Skip to content

Preserve half_float's precision in fields API #70653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 25, 2021

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Mar 22, 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

@nik9000 nik9000 added >enhancement :Search Foundations/Mapping Index mappings, including merging and defining field types v8.0.0 v7.13.0 labels Mar 22, 2021
@nik9000 nik9000 requested a review from jtibshirani March 22, 2021 15:14
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Mar 22, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

nik9000 added 3 commits March 22, 2021 11:15
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
Copy link
Member Author

nik9000 commented Mar 22, 2021

@elasticmachine update branch

@nik9000 nik9000 requested a review from astefan March 24, 2021 16:13
Copy link
Contributor

@jimczi jimczi 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
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

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

LGTM

@nik9000 nik9000 merged commit 24fa15d into elastic:master Mar 25, 2021
@nik9000
Copy link
Member Author

nik9000 commented Mar 25, 2021

Thanks for the reviews folks!

nik9000 added a commit to nik9000/elasticsearch that referenced this pull request 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 elastic#70260
nik9000 added a commit that referenced this pull request Mar 25, 2021
I made a mistake in a randomized test in #70653. It didn't trigger on my
PRs but the intake caught it. I just misplaced a decimal place.
nik9000 added a commit to nik9000/elasticsearch that referenced this pull request 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 added a commit that referenced this pull request Mar 25, 2021
…70888)

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
nik9000 added a commit to nik9000/elasticsearch that referenced this pull request Mar 25, 2021
This restores SQL's test for fetching `half_floats` after we backported
the precision change in that fetch (elastic#70653)
nik9000 added a commit that referenced this pull request Mar 26, 2021
This restores SQL's test for fetching `half_floats` after we backported
the precision change in that fetch (#70653)
nik9000 added a commit to nik9000/elasticsearch that referenced this pull request Mar 26, 2021
Now that elastic#70653 is merged we can send all kinds of strange values to the
`fields` round trip test for `half_float`.
nik9000 added a commit that referenced this pull request Apr 2, 2021
Now that #70653 is merged we can send all kinds of strange values to the
`fields` round trip test for `half_float`.
nik9000 added a commit to nik9000/elasticsearch that referenced this pull request Apr 2, 2021
Now that elastic#70653 is merged we can send all kinds of strange values to the
`fields` round trip test for `half_float`.
nik9000 added a commit that referenced this pull request Apr 2, 2021
Now that #70653 is merged we can send all kinds of strange values to the
`fields` round trip test for `half_float`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Meta label for search team v7.13.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fields API on half_float doesn't lose precision
6 participants