-
Notifications
You must be signed in to change notification settings - Fork 25k
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
[ML] Anomaly detection jobs should allow missing values for geo fields #57300
[ML] Anomaly detection jobs should allow missing values for geo fields #57300
Conversation
Pinging @elastic/ml-core (:ml) |
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.
👍
🔥🐛🔥
@@ -24,9 +24,13 @@ public GeoPointField(String name) { | |||
@Override | |||
public Object[] value(SearchHit hit) { | |||
Object[] value = super.value(hit); | |||
if (value.length != 1) { | |||
if (value.length == 0) { | |||
return new Object[0]; |
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.
Theoretically it would save a memory allocation and garbage collection to just return value;
. Maybe Hotspot will optimise this in practice.
Same in the other file.
Allows geo fields (`geo_point`, `geo_shape`) to have missing values. Fixes a bug where such missing values would result in an error. Closes elastic#57299
31296ca
to
50ff241
Compare
…fields (elastic#57300) Allows geo fields (`geo_point`, `geo_shape`) to have missing values. Fixes a bug where such missing values would result in an error. Closes elastic#57299 Backport of elastic#57300
…fields (elastic#57300) Allows geo fields (`geo_point`, `geo_shape`) to have missing values. Fixes a bug where such missing values would result in an error. Closes elastic#57299 Backport of elastic#57300
Allows geo fields (
geo_point
,geo_shape
) to have missing values.Fixes a bug where such missing values would result in an error.
Closes #57299