From 86c6c917772804f26f52fc4950f187466a37766c Mon Sep 17 00:00:00 2001 From: Ruben Quesada Lopez Date: Fri, 27 Dec 2024 17:48:33 +0000 Subject: [PATCH] Minor changes --- .../org/apache/calcite/rel/metadata/RelMdUtil.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdUtil.java b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdUtil.java index 2e47a09414b..6cb45aded54 100644 --- a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdUtil.java +++ b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdUtil.java @@ -568,15 +568,15 @@ public static void setAggChildKeys( ImmutableBitSet groupKey, Aggregate aggRel, ImmutableBitSet.Builder childKey) { - List aggCalls = aggRel.getAggCallList(); + final List aggCallList = aggRel.getAggCallList(); + final List groupList = aggRel.getGroupSet().asList(); for (int bit : groupKey) { if (bit < aggRel.getGroupCount()) { // group by column - childKey.set(aggRel.getGroupSet().asList().get(bit)); + childKey.set(groupList.get(bit)); } else { - // aggregate column -- set a bit for each argument being - // aggregated - AggregateCall agg = aggCalls.get(bit - aggRel.getGroupCount()); + // aggregate column -- set a bit for each argument being aggregated + final AggregateCall agg = aggCallList.get(bit - aggRel.getGroupCount()); for (Integer arg : agg.getArgList()) { childKey.set(arg); }