Commit 320fc75
authored
Currently, we only account for attributes after the TopN operation when
estimating its row size. This results in invalid estimates for the final
TopN on the coordinator and the node-level reduction TopN. This change
corrects the estimates and removes the workaround, paving the way for
enabling node-level reduction in ES|QL.
Closes #106956
1 parent b48beb3 commit 320fc75
File tree
5 files changed
+45
-25
lines changed- docs/changelog
- x-pack/plugin/esql/src
- main/java/org/elasticsearch/xpack/esql
- planner
- plan/physical
- test/java/org/elasticsearch/xpack/esql/optimizer
5 files changed
+45
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | 106 | | |
110 | 107 | | |
111 | 108 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
| |||
Lines changed: 3 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
| 349 | + | |
348 | 350 | | |
349 | 351 | | |
350 | 352 | | |
| |||
385 | 387 | | |
386 | 388 | | |
387 | 389 | | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | 390 | | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
| 391 | + | |
406 | 392 | | |
407 | 393 | | |
408 | 394 | | |
| |||
Lines changed: 31 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| |||
920 | 921 | | |
921 | 922 | | |
922 | 923 | | |
923 | | - | |
924 | | - | |
| 924 | + | |
| 925 | + | |
925 | 926 | | |
926 | 927 | | |
927 | 928 | | |
928 | 929 | | |
929 | 930 | | |
930 | 931 | | |
931 | 932 | | |
932 | | - | |
| 933 | + | |
933 | 934 | | |
934 | 935 | | |
935 | 936 | | |
| |||
1141 | 1142 | | |
1142 | 1143 | | |
1143 | 1144 | | |
1144 | | - | |
1145 | | - | |
| 1145 | + | |
| 1146 | + | |
1146 | 1147 | | |
1147 | 1148 | | |
1148 | 1149 | | |
| |||
7553 | 7554 | | |
7554 | 7555 | | |
7555 | 7556 | | |
| 7557 | + | |
| 7558 | + | |
| 7559 | + | |
| 7560 | + | |
| 7561 | + | |
| 7562 | + | |
| 7563 | + | |
| 7564 | + | |
| 7565 | + | |
| 7566 | + | |
| 7567 | + | |
| 7568 | + | |
| 7569 | + | |
| 7570 | + | |
| 7571 | + | |
| 7572 | + | |
| 7573 | + | |
| 7574 | + | |
| 7575 | + | |
| 7576 | + | |
| 7577 | + | |
| 7578 | + | |
| 7579 | + | |
| 7580 | + | |
| 7581 | + | |
7556 | 7582 | | |
7557 | 7583 | | |
7558 | 7584 | | |
| |||
0 commit comments