Skip to content

Clean up top_metric's internal API (backport of #71738)#71862

Merged
nik9000 merged 1 commit intoelastic:7.xfrom
nik9000:top_metrics_property_7_x
Apr 20, 2021
Merged

Clean up top_metric's internal API (backport of #71738)#71862
nik9000 merged 1 commit intoelastic:7.xfrom
nik9000:top_metrics_property_7_x

Conversation

@nik9000
Copy link
Copy Markdown
Member

@nik9000 nik9000 commented Apr 19, 2021

This changes top_metrics's implementation of getProperty and value
to be a bit more consisntent which shold make it easier to integrate
into transform. We expect value to return NaN when the value isn't a
number or is null but was throwing exceptions in both that cases.
getProperty was throwing exceptions on null and non-numeric values as
well. Now it returns null or BytesRef.

This changes `top_metrics`'s implementation of `getProperty` and `value`
to be a bit more consisntent which shold make it easier to integrate
into transform. We expect `value` to return `NaN` when the value isn't a
number or is null but was throwing exceptions in both that cases.
`getProperty` was throwing exceptions on null and non-numeric values as
well. Now it returns `null` or `BytesRef`.
@nik9000 nik9000 changed the title Clean up top_metric's internal API (#71738) Clean up top_metric's internal API (backport of #71738) Apr 19, 2021
@nik9000 nik9000 merged commit c4019b8 into elastic:7.x Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant