Skip to content

Script: ulong support via Fields API #76205

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

Closed
wants to merge 5 commits into from

Conversation

stu-elastic
Copy link
Contributor

Exposes unsigned long via the fields API.

Users must choose how to consume unsigned longs, either as regular java longs, where
the upper half of the range is treated as negative, or as BigIntegers.

Fields API now requires explicit typing until we do some work in painless work to allow duck
typing.

script_fields is not yet implemented with the fields API.

field('ul').asBigIntegerField().getValue(BigInteger.valueOf(1000))
field('ul').asBigInteger(BigInteger.valueOf(1000))
field('ul').asLongField().getValue(1000L)
field('ul').asLong(1000L)

Fixes: #64361

@stu-elastic stu-elastic added >enhancement :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache v8.0.0 auto-backport Automatically create backport pull requests when merged v7.15.0 labels Aug 6, 2021
@stu-elastic stu-elastic requested a review from rjernst August 6, 2021 01:54
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Aug 6, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@stu-elastic stu-elastic requested a review from jdconrad August 9, 2021 17:49
Copy link
Contributor

@jdconrad jdconrad 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 really good to me. One minor request - otherwise, I will leave the overall design review to @rjernst.

@stu-elastic
Copy link
Contributor Author

closed in favor of #76519

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >enhancement Team:Core/Infra Meta label for core/infra team v7.15.0 v8.0.0-alpha2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support unsigned long field type in painless
4 participants