Skip to content

Conversation

@stu-elastic
Copy link
Contributor

@stu-elastic stu-elastic commented Aug 9, 2021

get<T>(defaultValue) version of #76205

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.

// Typed field
field('ul').asBigIntegerField().getValue(BigInteger.valueOf(1000))
field('ul').asBigIntegerField().getBigInteger(BigInteger.valueOf(1000))

field('ul').asLongField().getValue(1000L)
field('ul').asLongField().getLong(1000L)


// Typed value
field('ul').getBigInteger(BigInteger.valueOf(1000))
field('ul').getLong(1000L)

// Def value
field('ul').getValue(BigInteger.valueOf(1000))
field('ul').getValue(1000L)

Fixes: #64361

@mark-vieira
Copy link
Contributor

@elasticmachine retest this please

@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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support unsigned long field type in painless

2 participants