-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Null values need to be converted to correct type for numeric matchers #133506
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
Null values need to be converted to correct type for numeric matchers #133506
Conversation
|
This could also be done by extending NumericMatcher with a separate LongMatcher, ShortMatcher, ByteMatcher, and FloatMatcher. I'm pretty indifferent to which way to do it. |
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
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.
I do wonder if it is more robust and readable to have a specific matcher for every number type. I think overall i prefer that but i haven't looked deeply to evaluate that. NumberMatcher existed because the logic was the same but now it isn't.
| } | ||
|
|
||
| yield s; | ||
| try { |
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.
While testing, found that the unsigned long mapper can accept unicode numbers and needs to be updates.
|
@lkts That makes sense. Separate classes are perhaps easier to understand. What do you think of this? |
|
This looks great, thanks for incorporating the suggestion. |
A recent change to the numeric matches uses specific Java types for the related matcher rather than Integer for all integer types and Double for all double types. The same needs to be done for null values for equality to work correctly.
Fixes #133560
Fixes #133499
Fixes #133498
Fixes #133497
Fixes #133518
Fixes #133517
Fixes #133516
Fixes #133505
Fixes #133504
Fixes #133503
Fixes #133520
Fixes #132602
Fixes #132601
Fixes #132600