Commit 516990c
authored
Remove ordinal grouping operator (#131133)
The ordinals grouping operator was introduced to speed up aggregation
before ordinal blocks and related optimizations in block hashes were
available. However, this operator has several issues:
1. It only supports single grouping with the `keyword` type and requires
`doc_values`.
2. It needs a separate aggregation implementation, which currently lacks
test coverage. We had performance issues with the `VALUES` aggregation
using this operator (see #130576).
3. It can be slower and use more memory when the target documents have
sparse cardinality (see #98963).
4. Ad-hoc planning, although this can now be addressed with local plans.
Although the ordinals grouping operator is slightly faster than the hash
operator with ordinal blocks, its complexity now outweighs the benefits.
This PR proposes removing the operator. Below is the NYC_taxis
benchmark.
Closes #989631 parent 04ae527 commit 516990c
File tree
15 files changed
+29
-1135
lines changed- benchmarks/src/main/java/org/elasticsearch/benchmark/compute/operator
- x-pack/plugin/esql
- compute/src
- main/java/org/elasticsearch/compute
- aggregation
- operator
- test/java/org/elasticsearch/compute
- aggregation
- qa
- server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node
- testFixtures/src/main/resources
- src
- internalClusterTest/java/org/elasticsearch/xpack/esql/action
- main/java/org/elasticsearch/xpack/esql
- optimizer/rules/physical/local
- planner
- plan/physical
- test/java/org/elasticsearch/xpack/esql
- optimizer
- planner
15 files changed
+29
-1135
lines changedLines changed: 5 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
| 98 | + | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
| |||
114 | 113 | | |
115 | 114 | | |
116 | 115 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 116 | + | |
121 | 117 | | |
122 | 118 | | |
123 | 119 | | |
| |||
132 | 128 | | |
133 | 129 | | |
134 | 130 | | |
135 | | - | |
136 | 131 | | |
137 | 132 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | 133 | | |
150 | 134 | | |
151 | 135 | | |
| |||
352 | 336 | | |
353 | 337 | | |
354 | 338 | | |
355 | | - | |
| 339 | + | |
356 | 340 | | |
357 | 341 | | |
358 | | - | |
| 342 | + | |
359 | 343 | | |
360 | | - | |
| 344 | + | |
361 | 345 | | |
362 | 346 | | |
363 | 347 | | |
| |||
Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 73 | | |
81 | 74 | | |
82 | 75 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
0 commit comments