From 3763f74f286958f4815083d709d75769b43a85de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Cea=20Fontenla?= Date: Wed, 27 Nov 2024 13:40:00 +0100 Subject: [PATCH] Restore Aggregate computeReferences() --- .../elasticsearch/xpack/esql/plan/logical/Aggregate.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Aggregate.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Aggregate.java index 1519d74a1e98f..e362c9646a8e0 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Aggregate.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Aggregate.java @@ -157,13 +157,7 @@ public static List output(List aggregates) @Override protected AttributeSet computeReferences() { - AttributeSet result = Expressions.references(groupings).combine(Expressions.references(aggregates)); - for (Expression grouping : groupings) { - if (grouping instanceof Alias) { - result.remove(((Alias) grouping).toAttribute()); - } - } - return result; + return computeReferences(aggregates, groupings); } public static AttributeSet computeReferences(List aggregates, List groupings) {