Skip to content

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Jul 7, 2025

Backports the following commits to 9.1:

Using the VALUES aggregator with ordinals grouping led to accidental 
quadratic complexity. Queries like FROM .. | STATS ... VALUES(field) ...
BY keyword-field are affected by this performance issue. This change
caches a sorted structure - previously used to fix a similar O(N^2)
problem when emitting the output block - during the merging phase of the
OrdinalGroupingOperator.
@dnhatn dnhatn added :Analytics/ES|QL AKA ESQL >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) labels Jul 7, 2025
@elasticsearchmachine elasticsearchmachine merged commit 3004d23 into elastic:9.1 Jul 7, 2025
34 checks passed
@dnhatn dnhatn deleted the backport/9.1/pr-130576 branch July 7, 2025 23:06
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 >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.1.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants