-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add half float mapping to the scripting fields API #82294
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
Conversation
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
|
Hi @jdconrad, I've created a changelog YAML for you. |
| } | ||
|
|
||
| class org.elasticsearch.script.field.HalfFloatDocValuesField @dynamic_type { | ||
| float get(double) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a note explaining why this takes a double but returns a float.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
stu-elastic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice.
|
@stu-elastic Thanks for the review. Will commit as soon as CI passes. |
|
Due to the casting between floats and doubles, I updated the test to use close_to instead of match. |
This adds the mapped type half float the scripting fields API. This also adds additional methods for
asDoubleto reach parity with old-styledocaccess.