[ES|QL] Fix sorting when aggregate_metric_double present#125191
[ES|QL] Fix sorting when aggregate_metric_double present#125191limotova merged 3 commits intoelastic:mainfrom
Conversation
d19a1ee to
5946e82
Compare
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.
5946e82 to
8604600
Compare
dnhatn
left a comment
There was a problem hiding this comment.
LGTM, thanks Larisa! I think I have a concern: we now assume that the composite block is an aggregation_metric_double block in many places.
We do indeed... maybe we should introduce a new block type or add some additional information to composite blocks to say what they're representing? |
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
|
Hi @limotova, I've created a changelog YAML for you. |
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
martijnvg
left a comment
There was a problem hiding this comment.
LGTM, thanks Larisa!
maybe we should introduce a new block type or add some additional information to composite blocks to say what they're representing?
I'm also a little bit worried that the generic CompositeBlock now has very specific usages. Maybe introducing CompositeType enum and adding as a field to CompositeBlock is suffcient? (
++. We can do it in a follow-up @limotova. |
) 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.
) 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.
* [ES|QL] ToAggregateMetricDouble function (#124595) 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). * remove old docs * [ES|QL] Add ToAggregateMetricDouble example (#125518) Adds AggregateMetricDouble to the ES|QL CSV tests and examples of how to use the ToAggregateMetricDouble function * [ES|QL] Fix sorting when aggregate_metric_double present (#125191) 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. * drop old style docs again * add new style docs * [CI] Auto commit changes from spotless --------- Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
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.