Skip to content
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

Add missing counter field support to some aggregations. #93311

Merged

Conversation

martijnvg
Copy link
Member

@martijnvg martijnvg commented Jan 27, 2023

This adds missing counter field support to min, max and top_metrics aggregations.

Not all aggregations support field with time_series_metric set to counter.
This is because computing certain aggregations on these counter fields don't make much sense.
For example, computing a sum or avg on a counter field doesn't make sense, because
counter fields are monodically increasing number fields (with sometimes a reset).

However supporting counter field support to min, max and top_metrics aggregations makes sense
and can be useful.

Add missing counter field support to min, max and top_metrics aggregations.
@martijnvg martijnvg added >non-issue :StorageEngine/TSDB You know, for Metrics labels Jan 27, 2023
@martijnvg martijnvg marked this pull request as ready for review January 27, 2023 16:14
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jan 27, 2023
Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check by chance if there other aggregations where the counter entry is missing? What about Gauge?

The previous error message was a bit tricky to understand. Could we also improve this?

@martijnvg
Copy link
Member Author

Did you check by chance if there other aggregations where the counter entry is missing?

I think with this change counter fields are supported by the following aggregations: rate, histogram, range,
min, max, top_metrics and variable_width_histogram.

The previous error message was a bit tricky to understand. Could we also improve this?

I will address this in a follow up.

Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :StorageEngine/TSDB You know, for Metrics Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants