Skip to content

[8.x] Backport to_aggregate_metric_double and sorting #126438

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

limotova
Copy link
Contributor

@limotova limotova commented Apr 8, 2025

Backports the following commits to 8.x:

limotova added 6 commits April 7, 2025 18:17
This commit adds a conversion function from numerics (and aggregate
metric doubles) to aggregate metric doubles.

It is most useful when you have multiple indices, where one index uses
aggregate metric double (e.g. a downsampled index) and another uses a
normal numeric type like long or double (e.g. an index prior to
downsampling).
Adds AggregateMetricDouble to the ES|QL CSV tests and examples of how to
use the ToAggregateMetricDouble function
)

Previously if an aggregate_metric_double was present amongst fields and
you tried to sort on any (not necessarily even on the agg_metric itself)
field in ES|QL, it would break the results.

This commit doesn't add support for sorting _on_ aggregate_metric_double
(it is unclear what aspect would be sorted), but it fixes the previous
behavior.
Copy link
Contributor

github-actions bot commented Apr 8, 2025

Documentation preview:

@limotova limotova added >enhancement backport auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :StorageEngine/TSDB You know, for Metrics :Analytics/ES|QL AKA ESQL labels Apr 8, 2025
@limotova limotova marked this pull request as ready for review April 8, 2025 06:12
@elasticsearchmachine elasticsearchmachine merged commit 2163ad5 into elastic:8.x Apr 8, 2025
15 checks passed
@limotova limotova deleted the backport-8.x-to-aggregate-metric-double-and-sorting branch April 8, 2025 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >enhancement :StorageEngine/TSDB You know, for Metrics v8.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants