Skip to content

Commit 7745195

Browse files
committed
Fix bwc
1 parent cab7c3e commit 7745195

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

x-pack/plugin/esql/qa/testFixtures/src/main/resources/eval.csv-spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@ foo:keyword
637637
;
638638

639639
evalAfterAvgGroupingUsingSameName
640+
required_capability: retain_aggregate_when_grouping
640641
from employees
641642
| stats avg = avg(salary) by gender
642643
| keep avg
@@ -650,6 +651,7 @@ avg:integer
650651
;
651652

652653
evalAfterGroupingUsingSameName
654+
required_capability: retain_aggregate_when_grouping
653655
row foo = [10,11,9], bar = [1,2,3]
654656
| mv_expand foo
655657
| mv_expand bar
@@ -665,6 +667,7 @@ this:integer
665667
;
666668

667669
evalAfterGroupingUsingSameName2
670+
required_capability: retain_aggregate_when_grouping
668671
from employees
669672
| stats count = count(emp_no) by gender, is_rehired
670673
| keep count

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,12 @@ public enum Cap {
413413
*/
414414
RENAME_SEQUENTIAL_PROCESSING,
415415

416+
/**
417+
* Support for retain aggregate when grouping.
418+
* See <a href="https://github.com/elastic/elasticsearch/issues/126026"> ES|QL: columns not projected away despite KEEP #126026 </a>
419+
*/
420+
RETAIN_AGGREGATE_WHEN_GROUPING,
421+
416422
/**
417423
* Fix for union-types when some indexes are missing the required field. Done in #111932.
418424
*/

0 commit comments

Comments
 (0)