Commit e16f459
authored
Avoid O(N^2) in VALUES with ordinals grouping (elastic#130576) (elastic#130778)
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.1 parent b96c22b commit e16f459
File tree
13 files changed
+663
-319
lines changed- docs/changelog
- x-pack/plugin/esql/compute/src/main
- generated-src/org/elasticsearch/compute/aggregation
- generated/org/elasticsearch/compute/aggregation
- java/org/elasticsearch/compute
- aggregation
- operator
13 files changed
+663
-319
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 119 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments