Commit 8682c18
authored
[ESQL] Fix TopN grouping aggregates bug with non-qualifying intermediate states (elastic#129633)
Continuation of elastic#127148
When datanodes send the STATS intermediate states to the coordinator, it aggregates them.
Now, however, the TopN groups sent by a datanode may not be acceptable in the coordinator (Because it has better values already), so it will discard such values.
However, the engine wasn't handling intermediate groups with nulls (TopNBlockHash uses nulls to discard unused groups).
See https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/GroupingAggregator.java#L47
_This code isn't connected with the query yet, so there's no bug in production_1 parent 9f22533 commit 8682c18
File tree
87 files changed
+5229
-411
lines changed- x-pack/plugin/esql/compute
- gen/src/main/java/org/elasticsearch/compute/gen
- src
- main
- generated/org/elasticsearch/compute/aggregation
- spatial
- java/org/elasticsearch/compute/aggregation
- test/java/org/elasticsearch/compute
- aggregation
- operator
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
87 files changed
+5229
-411
lines changedLines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
207 | 208 | | |
208 | 209 | | |
209 | | - | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
586 | | - | |
| 586 | + | |
| 587 | + | |
587 | 588 | | |
588 | 589 | | |
589 | 590 | | |
590 | | - | |
| 591 | + | |
591 | 592 | | |
592 | 593 | | |
593 | 594 | | |
| |||
613 | 614 | | |
614 | 615 | | |
615 | 616 | | |
616 | | - | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
617 | 629 | | |
618 | 630 | | |
619 | 631 | | |
| |||
664 | 676 | | |
665 | 677 | | |
666 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
667 | 682 | | |
668 | 683 | | |
669 | 684 | | |
| |||
Lines changed: 61 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 51 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 51 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments