-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Script: ulong via fields API #76519
Merged
stu-elastic
merged 16 commits into
elastic:master
from
stu-elastic:script/69742-06-ulong-as
Aug 17, 2021
Merged
Script: ulong via fields API #76519
stu-elastic
merged 16 commits into
elastic:master
from
stu-elastic:script/69742-06-ulong-as
Aug 17, 2021
Commits on Aug 13, 2021
-
Exposes unsigned long via the fields API. Unsigned longs default to java signed longs. That means the upper range appears negative. Consumers should use `Long.compareUnsigned(long, long)` `Long.divideUnsigned(long, long)` and `Long.remainderUnsigned(long, long)` to correctly work with values known to be unsigned long. Alternatively, users may treat the unsigned long type as `BigInteger` using the field API, `field('ul').as(Field.BigInteger).getValue(BigInteger.ZERO)`. ``` field('ul').as(Field.BigInteger).getValue(BigInteger.valueOf(1000)) field('ul').getValue(1000L) ``` This change also implements the beginning of the converters for the fields API. The following conversions have been added: ``` ulong <-> BigInteger long <-> BigInteger double -> BigInteger String (parsed as long or double) -> BigInteger double -> long String (parsed as long or double) -> long Date (epoch milliseconds) -> long Nano Date (epoch nanoseconds) -> long boolean (1L for true, 0L for false) -> long ``` Fixes: elastic#64361
Configuration menu - View commit details
-
Copy full SHA for e8663a9 - Browse repository at this point
Copy the full SHA e8663a9View commit details -
Merge branch 'master' of github.com:elastic/elasticsearch into script…
…/69742-06-ulong-as
Configuration menu - View commit details
-
Copy full SHA for f3f5700 - Browse repository at this point
Copy the full SHA f3f5700View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7adc6d4 - Browse repository at this point
Copy the full SHA 7adc6d4View commit details
Commits on Aug 16, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 60ebf61 - Browse repository at this point
Copy the full SHA 60ebf61View commit details -
Merge branch 'master' of github.com:elastic/elasticsearch into script…
…/69742-06-ulong-as
Configuration menu - View commit details
-
Copy full SHA for 5155e51 - Browse repository at this point
Copy the full SHA 5155e51View commit details -
Configuration menu - View commit details
-
Copy full SHA for 29dad53 - Browse repository at this point
Copy the full SHA 29dad53View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4904abc - Browse repository at this point
Copy the full SHA 4904abcView commit details -
Configuration menu - View commit details
-
Copy full SHA for aa52c00 - Browse repository at this point
Copy the full SHA aa52c00View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b1dc8a - Browse repository at this point
Copy the full SHA 2b1dc8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 69ec48d - Browse repository at this point
Copy the full SHA 69ec48dView commit details
Commits on Aug 17, 2021
-
Configuration menu - View commit details
-
Copy full SHA for b5a2965 - Browse repository at this point
Copy the full SHA b5a2965View commit details -
Configuration menu - View commit details
-
Copy full SHA for aef03a1 - Browse repository at this point
Copy the full SHA aef03a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for e60fe36 - Browse repository at this point
Copy the full SHA e60fe36View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d82d1a - Browse repository at this point
Copy the full SHA 5d82d1aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5153221 - Browse repository at this point
Copy the full SHA 5153221View commit details -
Configuration menu - View commit details
-
Copy full SHA for 369e58b - Browse repository at this point
Copy the full SHA 369e58bView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.