-
Notifications
You must be signed in to change notification settings - Fork 25.4k
ESQL: Fix validation NPE in Enrich and add extra @Nullable annotations #128260
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-analytical-engine (Team:Analytics) |
Hi @ivancea, I've created a changelog YAML for you. |
@@ -128,8 +129,8 @@ protected LookupResponse readLookupResponse(StreamInput in, BlockFactory blockFa | |||
return new LookupResponse(in, blockFactory); | |||
} | |||
|
|||
private static void validateTypes(DataType inputDataType, MappedFieldType fieldType) { | |||
if (fieldType instanceof RangeFieldMapper.RangeFieldType rangeType) { | |||
private static void validateTypes(@Nullable DataType inputDataType, MappedFieldType fieldType) { |
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.
The @Nullable
annotations are showing a warning here as expected. But they're not showing a warning on method calls. Not perfect, but well. I think they may still help (?)
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.
LGTM, although I'm assuming the annotations don't change anything and it's all in the inputDataType == null
check.
💔 Backport failed
You can use sqren/backport to manually backport by running |
elastic#128260) Fixes elastic#126253 Fixes elastic#126297 `inputDataType` may be null when in mixed cluster (<8.14). So `validateTypes()` should take that into account. Similar fix to elastic#116583
elastic#128260) Fixes elastic#126253 Fixes elastic#126297 `inputDataType` may be null when in mixed cluster (<8.14). So `validateTypes()` should take that into account. Similar fix to elastic#116583
Fixes #126253
Fixes #126297
inputDataType
may be null when in mixed cluster (<8.14). SovalidateTypes()
should take that into account. Similar fix to #116583