diff --git a/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/GroupingAggregatorImplementer.java b/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/GroupingAggregatorImplementer.java index c4b343c4c6017..db1b10e8d244e 100644 --- a/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/GroupingAggregatorImplementer.java +++ b/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/GroupingAggregatorImplementer.java @@ -726,11 +726,11 @@ private MethodSpec evaluateFinal() { .addParameter(BLOCK_ARRAY, "blocks") .addParameter(TypeName.INT, "offset") .addParameter(INT_VECTOR, "selected") - .addParameter(GROUPING_AGGREGATOR_EVALUATOR_CONTEXT, "evaluatorContext"); + .addParameter(GROUPING_AGGREGATOR_EVALUATOR_CONTEXT, "ctx"); if (aggState.declaredType().isPrimitive()) { - builder.addStatement("blocks[offset] = state.toValuesBlock(selected, evaluatorContext.driverContext())"); - } else if (timseries) { + builder.addStatement("blocks[offset] = state.toValuesBlock(selected, ctx.driverContext())"); + } else { requireStaticMethod( declarationType, requireType(BLOCK), @@ -741,15 +741,7 @@ private MethodSpec evaluateFinal() { requireType(GROUPING_AGGREGATOR_EVALUATOR_CONTEXT) ) ); - builder.addStatement("blocks[offset] = $T.evaluateFinal(state, selected, evaluatorContext)", declarationType); - } else { - requireStaticMethod( - declarationType, - requireType(BLOCK), - requireName("evaluateFinal"), - requireArgs(requireType(aggState.declaredType()), requireType(INT_VECTOR), requireType(DRIVER_CONTEXT)) - ); - builder.addStatement("blocks[offset] = $T.evaluateFinal(state, selected, evaluatorContext.driverContext())", declarationType); + builder.addStatement("blocks[offset] = $T.evaluateFinal(state, selected, ctx)", declarationType); } return builder.build(); } diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeDoubleAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeDoubleAggregator.java index 41e880c069e27..1f0c09e90cbdd 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeDoubleAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeDoubleAggregator.java @@ -7,6 +7,7 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.common.util.DoubleArray; import org.elasticsearch.common.util.LongArray; @@ -18,6 +19,7 @@ import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; +// end generated imports /** * A time-series aggregation function that collects the First occurrence value of a time series in a specified interval. @@ -55,8 +57,8 @@ public static void combineIntermediate( } } - public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext evalContext) { - return state.evaluateFinal(selected, evalContext); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateFinal(selected, ctx); } public static final class GroupingState extends AbstractArrayState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeFloatAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeFloatAggregator.java index cbf6251f40546..2e3f78255b817 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeFloatAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeFloatAggregator.java @@ -7,6 +7,7 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.common.util.FloatArray; import org.elasticsearch.common.util.LongArray; @@ -18,6 +19,7 @@ import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; +// end generated imports /** * A time-series aggregation function that collects the First occurrence value of a time series in a specified interval. @@ -55,8 +57,8 @@ public static void combineIntermediate( } } - public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext evalContext) { - return state.evaluateFinal(selected, evalContext); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateFinal(selected, ctx); } public static final class GroupingState extends AbstractArrayState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeIntAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeIntAggregator.java index 20df3c0a3a267..b88980c302887 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeIntAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeIntAggregator.java @@ -7,6 +7,7 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.common.util.IntArray; import org.elasticsearch.common.util.LongArray; @@ -18,6 +19,7 @@ import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; +// end generated imports /** * A time-series aggregation function that collects the First occurrence value of a time series in a specified interval. @@ -55,8 +57,8 @@ public static void combineIntermediate( } } - public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext evalContext) { - return state.evaluateFinal(selected, evalContext); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateFinal(selected, ctx); } public static final class GroupingState extends AbstractArrayState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeLongAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeLongAggregator.java index 084e3889e9ddf..62d49005e3f89 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeLongAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/FirstOverTimeLongAggregator.java @@ -7,15 +7,19 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.common.util.LongArray; +import org.elasticsearch.common.util.LongArray; import org.elasticsearch.compute.ann.GroupingAggregator; import org.elasticsearch.compute.ann.IntermediateState; import org.elasticsearch.compute.data.Block; +import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.data.IntVector; import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; +// end generated imports /** * A time-series aggregation function that collects the First occurrence value of a time series in a specified interval. @@ -53,8 +57,8 @@ public static void combineIntermediate( } } - public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext evalContext) { - return state.evaluateFinal(selected, evalContext); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateFinal(selected, ctx); } public static final class GroupingState extends AbstractArrayState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeDoubleAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeDoubleAggregator.java index 7d6c8a6c9ec2f..4dc519f8bef7a 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeDoubleAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeDoubleAggregator.java @@ -7,6 +7,7 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.common.util.DoubleArray; import org.elasticsearch.common.util.LongArray; @@ -18,6 +19,7 @@ import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; +// end generated imports /** * A time-series aggregation function that collects the Last occurrence value of a time series in a specified interval. @@ -55,8 +57,8 @@ public static void combineIntermediate( } } - public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext evalContext) { - return state.evaluateFinal(selected, evalContext); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateFinal(selected, ctx); } public static final class GroupingState extends AbstractArrayState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeFloatAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeFloatAggregator.java index cf35765ed3395..fe3d8f10332b4 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeFloatAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeFloatAggregator.java @@ -7,6 +7,7 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.common.util.FloatArray; import org.elasticsearch.common.util.LongArray; @@ -18,6 +19,7 @@ import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; +// end generated imports /** * A time-series aggregation function that collects the Last occurrence value of a time series in a specified interval. @@ -55,8 +57,8 @@ public static void combineIntermediate( } } - public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext evalContext) { - return state.evaluateFinal(selected, evalContext); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateFinal(selected, ctx); } public static final class GroupingState extends AbstractArrayState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeIntAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeIntAggregator.java index 78c664a37ee0c..ac040d33c59a1 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeIntAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeIntAggregator.java @@ -7,6 +7,7 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.common.util.IntArray; import org.elasticsearch.common.util.LongArray; @@ -18,6 +19,7 @@ import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; +// end generated imports /** * A time-series aggregation function that collects the Last occurrence value of a time series in a specified interval. @@ -55,8 +57,8 @@ public static void combineIntermediate( } } - public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext evalContext) { - return state.evaluateFinal(selected, evalContext); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateFinal(selected, ctx); } public static final class GroupingState extends AbstractArrayState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeLongAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeLongAggregator.java index 5acac93f6bbe6..c80fbde92f30e 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeLongAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/LastOverTimeLongAggregator.java @@ -7,15 +7,19 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.common.util.LongArray; +import org.elasticsearch.common.util.LongArray; import org.elasticsearch.compute.ann.GroupingAggregator; import org.elasticsearch.compute.ann.IntermediateState; import org.elasticsearch.compute.data.Block; +import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.data.IntVector; import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; +// end generated imports /** * A time-series aggregation function that collects the Last occurrence value of a time series in a specified interval. @@ -53,8 +57,8 @@ public static void combineIntermediate( } } - public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext evalContext) { - return state.evaluateFinal(selected, evalContext); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateFinal(selected, ctx); } public static final class GroupingState extends AbstractArrayState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateDoubleAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateDoubleAggregator.java index 830e2e113c5ab..9cac056738004 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateDoubleAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateDoubleAggregator.java @@ -7,6 +7,7 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.apache.lucene.util.Accountable; import org.apache.lucene.util.RamUsageEstimator; import org.elasticsearch.common.breaker.CircuitBreaker; @@ -18,11 +19,14 @@ import org.elasticsearch.compute.data.BlockFactory; import org.elasticsearch.compute.data.DoubleBlock; import org.elasticsearch.compute.data.DoubleVector; +import org.elasticsearch.compute.data.FloatBlock; +import org.elasticsearch.compute.data.IntBlock; import org.elasticsearch.compute.data.IntVector; import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasable; import org.elasticsearch.core.Releasables; +// end generated imports /** * A rate grouping aggregation definition for double. diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateFloatAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateFloatAggregator.java index dbb9681225fdb..4d134e7977990 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateFloatAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateFloatAggregator.java @@ -7,6 +7,7 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.apache.lucene.util.Accountable; import org.apache.lucene.util.RamUsageEstimator; import org.elasticsearch.common.breaker.CircuitBreaker; @@ -19,11 +20,13 @@ import org.elasticsearch.compute.data.DoubleBlock; import org.elasticsearch.compute.data.DoubleVector; import org.elasticsearch.compute.data.FloatBlock; +import org.elasticsearch.compute.data.IntBlock; import org.elasticsearch.compute.data.IntVector; import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasable; import org.elasticsearch.core.Releasables; +// end generated imports /** * A rate grouping aggregation definition for float. diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateIntAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateIntAggregator.java index 5a9010b9a00e6..20aa108ce6747 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateIntAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateIntAggregator.java @@ -7,6 +7,7 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.apache.lucene.util.Accountable; import org.apache.lucene.util.RamUsageEstimator; import org.elasticsearch.common.breaker.CircuitBreaker; @@ -18,12 +19,14 @@ import org.elasticsearch.compute.data.BlockFactory; import org.elasticsearch.compute.data.DoubleBlock; import org.elasticsearch.compute.data.DoubleVector; +import org.elasticsearch.compute.data.FloatBlock; import org.elasticsearch.compute.data.IntBlock; import org.elasticsearch.compute.data.IntVector; import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasable; import org.elasticsearch.core.Releasables; +// end generated imports /** * A rate grouping aggregation definition for int. diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateLongAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateLongAggregator.java index 0a1d91b29b36f..e0d07cd76fe9c 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateLongAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/RateLongAggregator.java @@ -7,6 +7,7 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.apache.lucene.util.Accountable; import org.apache.lucene.util.RamUsageEstimator; import org.elasticsearch.common.breaker.CircuitBreaker; @@ -18,11 +19,14 @@ import org.elasticsearch.compute.data.BlockFactory; import org.elasticsearch.compute.data.DoubleBlock; import org.elasticsearch.compute.data.DoubleVector; +import org.elasticsearch.compute.data.FloatBlock; +import org.elasticsearch.compute.data.IntBlock; import org.elasticsearch.compute.data.IntVector; import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasable; import org.elasticsearch.core.Releasables; +// end generated imports /** * A rate grouping aggregation definition for long. diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleBooleanAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleBooleanAggregator.java index 6017256910e44..28cab06721c33 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleBooleanAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleBooleanAggregator.java @@ -84,8 +84,8 @@ public static void combineIntermediate(GroupingState state, int groupId, BytesRe } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return stripWeights(driverContext, state.toBlock(driverContext.blockFactory(), selected)); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return stripWeights(ctx.driverContext(), state.toBlock(ctx.blockFactory(), selected)); } private static Block stripWeights(DriverContext driverContext, Block block) { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleBytesRefAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleBytesRefAggregator.java index 2917efbff7ad1..e939e5ef13ec2 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleBytesRefAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleBytesRefAggregator.java @@ -84,8 +84,8 @@ public static void combineIntermediate(GroupingState state, int groupId, BytesRe } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return stripWeights(driverContext, state.toBlock(driverContext.blockFactory(), selected)); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return stripWeights(ctx.driverContext(), state.toBlock(ctx.blockFactory(), selected)); } private static Block stripWeights(DriverContext driverContext, Block block) { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleDoubleAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleDoubleAggregator.java index 14578b7c2c15d..8c0317fb9a9ee 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleDoubleAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleDoubleAggregator.java @@ -84,8 +84,8 @@ public static void combineIntermediate(GroupingState state, int groupId, BytesRe } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return stripWeights(driverContext, state.toBlock(driverContext.blockFactory(), selected)); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return stripWeights(ctx.driverContext(), state.toBlock(ctx.blockFactory(), selected)); } private static Block stripWeights(DriverContext driverContext, Block block) { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleIntAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleIntAggregator.java index 6d25d4005f100..3015f82bf8ca2 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleIntAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleIntAggregator.java @@ -84,8 +84,8 @@ public static void combineIntermediate(GroupingState state, int groupId, BytesRe } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return stripWeights(driverContext, state.toBlock(driverContext.blockFactory(), selected)); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return stripWeights(ctx.driverContext(), state.toBlock(ctx.blockFactory(), selected)); } private static Block stripWeights(DriverContext driverContext, Block block) { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleLongAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleLongAggregator.java index 680b513f5d01b..04386914b6c76 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleLongAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleLongAggregator.java @@ -84,8 +84,8 @@ public static void combineIntermediate(GroupingState state, int groupId, BytesRe } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return stripWeights(driverContext, state.toBlock(driverContext.blockFactory(), selected)); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return stripWeights(ctx.driverContext(), state.toBlock(ctx.blockFactory(), selected)); } private static Block stripWeights(DriverContext driverContext, Block block) { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevDoubleAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevDoubleAggregator.java index cb2550d1ce726..8cf0809164aa1 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevDoubleAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevDoubleAggregator.java @@ -56,7 +56,7 @@ public static void combineIntermediate(StdDevStates.GroupingState state, int gro state.combine(groupId, mean, m2, count); } - public static Block evaluateFinal(StdDevStates.GroupingState state, IntVector selected, DriverContext driverContext) { - return state.evaluateFinal(selected, driverContext); + public static Block evaluateFinal(StdDevStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateFinal(selected, ctx.driverContext()); } } diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevFloatAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevFloatAggregator.java index 8ac7a21817abe..7fd851a16ab8f 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevFloatAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevFloatAggregator.java @@ -56,7 +56,7 @@ public static void combineIntermediate(StdDevStates.GroupingState state, int gro state.combine(groupId, mean, m2, count); } - public static Block evaluateFinal(StdDevStates.GroupingState state, IntVector selected, DriverContext driverContext) { - return state.evaluateFinal(selected, driverContext); + public static Block evaluateFinal(StdDevStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateFinal(selected, ctx.driverContext()); } } diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevIntAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevIntAggregator.java index 991382560269a..30adf0e28b1b4 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevIntAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevIntAggregator.java @@ -56,7 +56,7 @@ public static void combineIntermediate(StdDevStates.GroupingState state, int gro state.combine(groupId, mean, m2, count); } - public static Block evaluateFinal(StdDevStates.GroupingState state, IntVector selected, DriverContext driverContext) { - return state.evaluateFinal(selected, driverContext); + public static Block evaluateFinal(StdDevStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateFinal(selected, ctx.driverContext()); } } diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevLongAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevLongAggregator.java index 5df0e5ae061a4..4f6b5008d79eb 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevLongAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/StdDevLongAggregator.java @@ -56,7 +56,7 @@ public static void combineIntermediate(StdDevStates.GroupingState state, int gro state.combine(groupId, mean, m2, count); } - public static Block evaluateFinal(StdDevStates.GroupingState state, IntVector selected, DriverContext driverContext) { - return state.evaluateFinal(selected, driverContext); + public static Block evaluateFinal(StdDevStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateFinal(selected, ctx.driverContext()); } } diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopBooleanAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopBooleanAggregator.java index 1b683b99c9df5..f93e3095524c4 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopBooleanAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopBooleanAggregator.java @@ -7,6 +7,9 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports +import org.apache.lucene.util.BytesRef; +import org.elasticsearch.common.breaker.CircuitBreaker; import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.compute.ann.Aggregator; import org.elasticsearch.compute.ann.GroupingAggregator; @@ -15,10 +18,12 @@ import org.elasticsearch.compute.data.BlockFactory; import org.elasticsearch.compute.data.BooleanBlock; import org.elasticsearch.compute.data.IntVector; +import org.elasticsearch.compute.data.BooleanBlock; import org.elasticsearch.compute.data.sort.BooleanBucketedSort; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; import org.elasticsearch.search.sort.SortOrder; +// end generated imports /** * Aggregates the top N field values for boolean. @@ -65,8 +70,8 @@ public static void combineIntermediate(GroupingState state, int groupId, Boolean } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(driverContext.blockFactory(), selected); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(ctx.blockFactory(), selected); } public static class GroupingState implements GroupingAggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopBytesRefAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopBytesRefAggregator.java index 5ec303500451a..ecc68e7d8a992 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopBytesRefAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopBytesRefAggregator.java @@ -7,6 +7,7 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.apache.lucene.util.BytesRef; import org.elasticsearch.common.breaker.CircuitBreaker; import org.elasticsearch.common.util.BigArrays; @@ -17,10 +18,12 @@ import org.elasticsearch.compute.data.BlockFactory; import org.elasticsearch.compute.data.BytesRefBlock; import org.elasticsearch.compute.data.IntVector; +import org.elasticsearch.compute.data.BytesRefBlock; import org.elasticsearch.compute.data.sort.BytesRefBucketedSort; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; import org.elasticsearch.search.sort.SortOrder; +// end generated imports /** * Aggregates the top N field values for BytesRef. @@ -69,8 +72,8 @@ public static void combineIntermediate(GroupingState state, int groupId, BytesRe } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(driverContext.blockFactory(), selected); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(ctx.blockFactory(), selected); } public static class GroupingState implements GroupingAggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopDoubleAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopDoubleAggregator.java index ac833dee81922..e9e1803e36fff 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopDoubleAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopDoubleAggregator.java @@ -7,6 +7,9 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports +import org.apache.lucene.util.BytesRef; +import org.elasticsearch.common.breaker.CircuitBreaker; import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.compute.ann.Aggregator; import org.elasticsearch.compute.ann.GroupingAggregator; @@ -15,10 +18,12 @@ import org.elasticsearch.compute.data.BlockFactory; import org.elasticsearch.compute.data.DoubleBlock; import org.elasticsearch.compute.data.IntVector; +import org.elasticsearch.compute.data.DoubleBlock; import org.elasticsearch.compute.data.sort.DoubleBucketedSort; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; import org.elasticsearch.search.sort.SortOrder; +// end generated imports /** * Aggregates the top N field values for double. @@ -65,8 +70,8 @@ public static void combineIntermediate(GroupingState state, int groupId, DoubleB } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(driverContext.blockFactory(), selected); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(ctx.blockFactory(), selected); } public static class GroupingState implements GroupingAggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopFloatAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopFloatAggregator.java index 50e652d0af6f0..1b5fddc0b0038 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopFloatAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopFloatAggregator.java @@ -7,6 +7,9 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports +import org.apache.lucene.util.BytesRef; +import org.elasticsearch.common.breaker.CircuitBreaker; import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.compute.ann.Aggregator; import org.elasticsearch.compute.ann.GroupingAggregator; @@ -15,10 +18,12 @@ import org.elasticsearch.compute.data.BlockFactory; import org.elasticsearch.compute.data.FloatBlock; import org.elasticsearch.compute.data.IntVector; +import org.elasticsearch.compute.data.FloatBlock; import org.elasticsearch.compute.data.sort.FloatBucketedSort; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; import org.elasticsearch.search.sort.SortOrder; +// end generated imports /** * Aggregates the top N field values for float. @@ -65,8 +70,8 @@ public static void combineIntermediate(GroupingState state, int groupId, FloatBl } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(driverContext.blockFactory(), selected); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(ctx.blockFactory(), selected); } public static class GroupingState implements GroupingAggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopIntAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopIntAggregator.java index d0d93b2d971f5..aa8c5e8e1bf3f 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopIntAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopIntAggregator.java @@ -7,6 +7,9 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports +import org.apache.lucene.util.BytesRef; +import org.elasticsearch.common.breaker.CircuitBreaker; import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.compute.ann.Aggregator; import org.elasticsearch.compute.ann.GroupingAggregator; @@ -15,10 +18,12 @@ import org.elasticsearch.compute.data.BlockFactory; import org.elasticsearch.compute.data.IntBlock; import org.elasticsearch.compute.data.IntVector; +import org.elasticsearch.compute.data.IntBlock; import org.elasticsearch.compute.data.sort.IntBucketedSort; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; import org.elasticsearch.search.sort.SortOrder; +// end generated imports /** * Aggregates the top N field values for int. @@ -65,8 +70,8 @@ public static void combineIntermediate(GroupingState state, int groupId, IntBloc } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(driverContext.blockFactory(), selected); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(ctx.blockFactory(), selected); } public static class GroupingState implements GroupingAggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopIpAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopIpAggregator.java index 16a26c5f01f52..831f573cb3cd0 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopIpAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopIpAggregator.java @@ -7,7 +7,9 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.apache.lucene.util.BytesRef; +import org.elasticsearch.common.breaker.CircuitBreaker; import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.compute.ann.Aggregator; import org.elasticsearch.compute.ann.GroupingAggregator; @@ -16,10 +18,12 @@ import org.elasticsearch.compute.data.BlockFactory; import org.elasticsearch.compute.data.BytesRefBlock; import org.elasticsearch.compute.data.IntVector; +import org.elasticsearch.compute.data.BytesRefBlock; import org.elasticsearch.compute.data.sort.IpBucketedSort; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; import org.elasticsearch.search.sort.SortOrder; +// end generated imports /** * Aggregates the top N field values for BytesRef. @@ -68,8 +72,8 @@ public static void combineIntermediate(GroupingState state, int groupId, BytesRe } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(driverContext.blockFactory(), selected); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(ctx.blockFactory(), selected); } public static class GroupingState implements GroupingAggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopLongAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopLongAggregator.java index 754a4e513eaab..a31ee1afd8a07 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopLongAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/TopLongAggregator.java @@ -7,18 +7,23 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports +import org.apache.lucene.util.BytesRef; +import org.elasticsearch.common.breaker.CircuitBreaker; import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.compute.ann.Aggregator; import org.elasticsearch.compute.ann.GroupingAggregator; import org.elasticsearch.compute.ann.IntermediateState; import org.elasticsearch.compute.data.Block; import org.elasticsearch.compute.data.BlockFactory; +import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.data.IntVector; import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.data.sort.LongBucketedSort; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; import org.elasticsearch.search.sort.SortOrder; +// end generated imports /** * Aggregates the top N field values for long. @@ -65,8 +70,8 @@ public static void combineIntermediate(GroupingState state, int groupId, LongBlo } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(driverContext.blockFactory(), selected); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(ctx.blockFactory(), selected); } public static class GroupingState implements GroupingAggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesBytesRefAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesBytesRefAggregator.java index 9b5aa1ec9ae59..7a1f7f5df2bcd 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesBytesRefAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesBytesRefAggregator.java @@ -95,8 +95,8 @@ public static void combineIntermediate(GroupingState state, int positionOffset, ValuesBytesRefAggregators.combineIntermediateInputValues(state, positionOffset, groups, values); } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(driverContext.blockFactory(), selected); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(ctx.blockFactory(), selected); } public static class SingleState implements AggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesDoubleAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesDoubleAggregator.java index e9c217ff172b7..6eab9d1673e17 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesDoubleAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesDoubleAggregator.java @@ -78,8 +78,8 @@ public static void combineIntermediate(GroupingState state, int groupId, DoubleB } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(driverContext.blockFactory(), selected); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(ctx.blockFactory(), selected); } public static class SingleState implements AggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesFloatAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesFloatAggregator.java index cd8ed8a854763..e60e23375dc9c 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesFloatAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesFloatAggregator.java @@ -78,8 +78,8 @@ public static void combineIntermediate(GroupingState state, int groupId, FloatBl } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(driverContext.blockFactory(), selected); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(ctx.blockFactory(), selected); } public static class SingleState implements AggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesIntAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesIntAggregator.java index f6c05104f749b..14b3d8e75cc90 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesIntAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesIntAggregator.java @@ -78,8 +78,8 @@ public static void combineIntermediate(GroupingState state, int groupId, IntBloc } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(driverContext.blockFactory(), selected); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(ctx.blockFactory(), selected); } public static class SingleState implements AggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesLongAggregator.java b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesLongAggregator.java index 93bfdce654d1e..213a09c67ffdb 100644 --- a/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesLongAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesLongAggregator.java @@ -78,8 +78,8 @@ public static void combineIntermediate(GroupingState state, int groupId, LongBlo } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(driverContext.blockFactory(), selected); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(ctx.blockFactory(), selected); } public static class SingleState implements AggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctBooleanGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctBooleanGroupingAggregatorFunction.java index 9d04612e02511..1da51bb76ba65 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctBooleanGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctBooleanGroupingAggregatorFunction.java @@ -281,8 +281,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = CountDistinctBooleanAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = CountDistinctBooleanAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctBytesRefGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctBytesRefGroupingAggregatorFunction.java index e73d20887e29e..28e546dc4e0b0 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctBytesRefGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctBytesRefGroupingAggregatorFunction.java @@ -275,8 +275,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = CountDistinctBytesRefAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = CountDistinctBytesRefAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctDoubleGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctDoubleGroupingAggregatorFunction.java index 9011e9ea7de07..838e9294623f5 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctDoubleGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctDoubleGroupingAggregatorFunction.java @@ -271,8 +271,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = CountDistinctDoubleAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = CountDistinctDoubleAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctFloatGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctFloatGroupingAggregatorFunction.java index 6296aac243bcc..a2fec8d324289 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctFloatGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctFloatGroupingAggregatorFunction.java @@ -271,8 +271,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = CountDistinctFloatAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = CountDistinctFloatAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctIntGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctIntGroupingAggregatorFunction.java index 8ff5b6636bc57..8c03e446b62ce 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctIntGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctIntGroupingAggregatorFunction.java @@ -270,8 +270,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = CountDistinctIntAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = CountDistinctIntAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctLongGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctLongGroupingAggregatorFunction.java index e6c746887f6f9..9e9e300124382 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctLongGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/CountDistinctLongGroupingAggregatorFunction.java @@ -271,8 +271,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = CountDistinctLongAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = CountDistinctLongAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeDoubleGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeDoubleGroupingAggregatorFunction.java index 08e11f0ddb3d6..cf7d9d9cee98c 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeDoubleGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeDoubleGroupingAggregatorFunction.java @@ -297,8 +297,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = FirstOverTimeDoubleAggregator.evaluateFinal(state, selected, evaluatorContext); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = FirstOverTimeDoubleAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeFloatGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeFloatGroupingAggregatorFunction.java index f17f5facc8c85..b1b996f6011bc 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeFloatGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeFloatGroupingAggregatorFunction.java @@ -297,8 +297,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = FirstOverTimeFloatAggregator.evaluateFinal(state, selected, evaluatorContext); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = FirstOverTimeFloatAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeIntGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeIntGroupingAggregatorFunction.java index a973f01dcda3a..8370c554c1b61 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeIntGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeIntGroupingAggregatorFunction.java @@ -296,8 +296,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = FirstOverTimeIntAggregator.evaluateFinal(state, selected, evaluatorContext); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = FirstOverTimeIntAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeLongGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeLongGroupingAggregatorFunction.java index 0d88b3190f1f3..e69156f197b17 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeLongGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/FirstOverTimeLongGroupingAggregatorFunction.java @@ -295,8 +295,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = FirstOverTimeLongAggregator.evaluateFinal(state, selected, evaluatorContext); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = FirstOverTimeLongAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeDoubleGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeDoubleGroupingAggregatorFunction.java index ad935063a95b4..39ad6361f2343 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeDoubleGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeDoubleGroupingAggregatorFunction.java @@ -297,8 +297,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = LastOverTimeDoubleAggregator.evaluateFinal(state, selected, evaluatorContext); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = LastOverTimeDoubleAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeFloatGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeFloatGroupingAggregatorFunction.java index 249b27bf7ee70..29888cb353af3 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeFloatGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeFloatGroupingAggregatorFunction.java @@ -297,8 +297,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = LastOverTimeFloatAggregator.evaluateFinal(state, selected, evaluatorContext); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = LastOverTimeFloatAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeIntGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeIntGroupingAggregatorFunction.java index fe25154290aac..1406e83125056 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeIntGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeIntGroupingAggregatorFunction.java @@ -296,8 +296,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = LastOverTimeIntAggregator.evaluateFinal(state, selected, evaluatorContext); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = LastOverTimeIntAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeLongGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeLongGroupingAggregatorFunction.java index 3772f8bf186c1..3fb2d371f3db7 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeLongGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/LastOverTimeLongGroupingAggregatorFunction.java @@ -295,8 +295,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = LastOverTimeLongAggregator.evaluateFinal(state, selected, evaluatorContext); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = LastOverTimeLongAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxBooleanGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxBooleanGroupingAggregatorFunction.java index ab6177f82e6e4..cf864d27cd81c 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxBooleanGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxBooleanGroupingAggregatorFunction.java @@ -287,8 +287,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = state.toValuesBlock(selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = state.toValuesBlock(selected, ctx.driverContext()); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxBytesRefGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxBytesRefGroupingAggregatorFunction.java index 588144c23162f..1e5fd4f0c3899 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxBytesRefGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxBytesRefGroupingAggregatorFunction.java @@ -293,8 +293,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = MaxBytesRefAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = MaxBytesRefAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxDoubleGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxDoubleGroupingAggregatorFunction.java index cf06006a24150..1ccf2e88c017e 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxDoubleGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxDoubleGroupingAggregatorFunction.java @@ -289,8 +289,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = state.toValuesBlock(selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = state.toValuesBlock(selected, ctx.driverContext()); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxFloatGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxFloatGroupingAggregatorFunction.java index 5d1ac766b590d..bb01720e0a1bf 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxFloatGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxFloatGroupingAggregatorFunction.java @@ -289,8 +289,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = state.toValuesBlock(selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = state.toValuesBlock(selected, ctx.driverContext()); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxIntGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxIntGroupingAggregatorFunction.java index ee501aed26bc2..194a71b696551 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxIntGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxIntGroupingAggregatorFunction.java @@ -288,8 +288,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = state.toValuesBlock(selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = state.toValuesBlock(selected, ctx.driverContext()); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxIpGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxIpGroupingAggregatorFunction.java index cfc13a77b2984..fb4a57d4c00f2 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxIpGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxIpGroupingAggregatorFunction.java @@ -293,8 +293,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = MaxIpAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = MaxIpAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxLongGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxLongGroupingAggregatorFunction.java index 36e2101baaae7..d1962bbb85f5d 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxLongGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxLongGroupingAggregatorFunction.java @@ -289,8 +289,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = state.toValuesBlock(selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = state.toValuesBlock(selected, ctx.driverContext()); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationDoubleGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationDoubleGroupingAggregatorFunction.java index bdc7ebfeb03f2..47e08286b18b9 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationDoubleGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationDoubleGroupingAggregatorFunction.java @@ -268,8 +268,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = MedianAbsoluteDeviationDoubleAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = MedianAbsoluteDeviationDoubleAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationFloatGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationFloatGroupingAggregatorFunction.java index b789cae8704a3..7351dc858e699 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationFloatGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationFloatGroupingAggregatorFunction.java @@ -268,8 +268,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = MedianAbsoluteDeviationFloatAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = MedianAbsoluteDeviationFloatAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationIntGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationIntGroupingAggregatorFunction.java index 6cc6271982921..ba5dd2deea517 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationIntGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationIntGroupingAggregatorFunction.java @@ -267,8 +267,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = MedianAbsoluteDeviationIntAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = MedianAbsoluteDeviationIntAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationLongGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationLongGroupingAggregatorFunction.java index cccdec47b3030..1c2faf0f14ab5 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationLongGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationLongGroupingAggregatorFunction.java @@ -268,8 +268,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = MedianAbsoluteDeviationLongAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = MedianAbsoluteDeviationLongAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinBooleanGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinBooleanGroupingAggregatorFunction.java index 52231c0e8975e..0d7f889f28522 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinBooleanGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinBooleanGroupingAggregatorFunction.java @@ -287,8 +287,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = state.toValuesBlock(selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = state.toValuesBlock(selected, ctx.driverContext()); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinBytesRefGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinBytesRefGroupingAggregatorFunction.java index e7baef1459eb8..d1d05590fe3c6 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinBytesRefGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinBytesRefGroupingAggregatorFunction.java @@ -293,8 +293,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = MinBytesRefAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = MinBytesRefAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinDoubleGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinDoubleGroupingAggregatorFunction.java index ea1ecf6c1f271..24fc477a04d9b 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinDoubleGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinDoubleGroupingAggregatorFunction.java @@ -289,8 +289,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = state.toValuesBlock(selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = state.toValuesBlock(selected, ctx.driverContext()); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinFloatGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinFloatGroupingAggregatorFunction.java index bf489b7bf6dc9..810ab2601ce9e 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinFloatGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinFloatGroupingAggregatorFunction.java @@ -289,8 +289,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = state.toValuesBlock(selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = state.toValuesBlock(selected, ctx.driverContext()); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinIntGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinIntGroupingAggregatorFunction.java index 51102c5dff22a..6f73116241dd6 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinIntGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinIntGroupingAggregatorFunction.java @@ -288,8 +288,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = state.toValuesBlock(selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = state.toValuesBlock(selected, ctx.driverContext()); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinIpGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinIpGroupingAggregatorFunction.java index 542f744c04a8a..8192f8d970522 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinIpGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinIpGroupingAggregatorFunction.java @@ -293,8 +293,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = MinIpAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = MinIpAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinLongGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinLongGroupingAggregatorFunction.java index e5683a154285d..cb5afc294bb1a 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinLongGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinLongGroupingAggregatorFunction.java @@ -289,8 +289,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = state.toValuesBlock(selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = state.toValuesBlock(selected, ctx.driverContext()); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileDoubleGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileDoubleGroupingAggregatorFunction.java index 4e88aa944f6b5..0639cc0028310 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileDoubleGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileDoubleGroupingAggregatorFunction.java @@ -271,8 +271,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = PercentileDoubleAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = PercentileDoubleAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileFloatGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileFloatGroupingAggregatorFunction.java index 04f057ff87cb8..b66d01b68f229 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileFloatGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileFloatGroupingAggregatorFunction.java @@ -271,8 +271,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = PercentileFloatAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = PercentileFloatAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileIntGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileIntGroupingAggregatorFunction.java index 402c928970893..b42d8b5d87709 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileIntGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileIntGroupingAggregatorFunction.java @@ -270,8 +270,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = PercentileIntAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = PercentileIntAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileLongGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileLongGroupingAggregatorFunction.java index 8509057d6202f..1adfcadb1150e 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileLongGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/PercentileLongGroupingAggregatorFunction.java @@ -271,8 +271,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = PercentileLongAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = PercentileLongAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateDoubleGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateDoubleGroupingAggregatorFunction.java index 79db8bb3401a1..61840a59d6bbb 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateDoubleGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateDoubleGroupingAggregatorFunction.java @@ -330,8 +330,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = RateDoubleAggregator.evaluateFinal(state, selected, evaluatorContext); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = RateDoubleAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateFloatGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateFloatGroupingAggregatorFunction.java index 892ed9c2eb25f..35d6085b495ec 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateFloatGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateFloatGroupingAggregatorFunction.java @@ -332,8 +332,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = RateFloatAggregator.evaluateFinal(state, selected, evaluatorContext); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = RateFloatAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateIntGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateIntGroupingAggregatorFunction.java index bc8445cc9f069..a3df3a2e48912 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateIntGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateIntGroupingAggregatorFunction.java @@ -330,8 +330,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = RateIntAggregator.evaluateFinal(state, selected, evaluatorContext); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = RateIntAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateLongGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateLongGroupingAggregatorFunction.java index 16d8c8b0b2fa8..01da3ba8c3f55 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateLongGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/RateLongGroupingAggregatorFunction.java @@ -330,8 +330,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = RateLongAggregator.evaluateFinal(state, selected, evaluatorContext); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = RateLongAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleBooleanGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleBooleanGroupingAggregatorFunction.java index 5ddd5fc7e4a30..ff975c662f089 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleBooleanGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleBooleanGroupingAggregatorFunction.java @@ -270,8 +270,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SampleBooleanAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SampleBooleanAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleBytesRefGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleBytesRefGroupingAggregatorFunction.java index 0ce4aa997db6e..efccd08d416ef 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleBytesRefGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleBytesRefGroupingAggregatorFunction.java @@ -275,8 +275,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SampleBytesRefAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SampleBytesRefAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleDoubleGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleDoubleGroupingAggregatorFunction.java index 05e1dc8ba1783..d98332e2b7242 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleDoubleGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleDoubleGroupingAggregatorFunction.java @@ -270,8 +270,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SampleDoubleAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SampleDoubleAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleIntGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleIntGroupingAggregatorFunction.java index 9935a7bfe654d..05d4d0a16801b 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleIntGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleIntGroupingAggregatorFunction.java @@ -269,8 +269,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SampleIntAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SampleIntAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleLongGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleLongGroupingAggregatorFunction.java index 7570225ce5f38..64d29eeaf60aa 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleLongGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SampleLongGroupingAggregatorFunction.java @@ -270,8 +270,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SampleLongAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SampleLongAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevDoubleGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevDoubleGroupingAggregatorFunction.java index 4dd4649472948..83af53eebf60e 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevDoubleGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevDoubleGroupingAggregatorFunction.java @@ -299,8 +299,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = StdDevDoubleAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = StdDevDoubleAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevFloatGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevFloatGroupingAggregatorFunction.java index c78ea039edb63..2d86c3355c4fc 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevFloatGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevFloatGroupingAggregatorFunction.java @@ -301,8 +301,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = StdDevFloatAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = StdDevFloatAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevIntGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevIntGroupingAggregatorFunction.java index 32839ee533cbf..5f09d9ab82ad8 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevIntGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevIntGroupingAggregatorFunction.java @@ -300,8 +300,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = StdDevIntAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = StdDevIntAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevLongGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevLongGroupingAggregatorFunction.java index e06207363bbc6..bf9a79addd086 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevLongGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/StdDevLongGroupingAggregatorFunction.java @@ -299,8 +299,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = StdDevLongAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = StdDevLongAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumDoubleGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumDoubleGroupingAggregatorFunction.java index 88d147c3fd451..c4b888032dbb1 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumDoubleGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumDoubleGroupingAggregatorFunction.java @@ -299,8 +299,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SumDoubleAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SumDoubleAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumFloatGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumFloatGroupingAggregatorFunction.java index d7f0f6185d318..5debadd250fb6 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumFloatGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumFloatGroupingAggregatorFunction.java @@ -301,8 +301,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SumFloatAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SumFloatAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumIntGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumIntGroupingAggregatorFunction.java index 05b29459d1e02..d4faee6d9428d 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumIntGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumIntGroupingAggregatorFunction.java @@ -290,8 +290,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = state.toValuesBlock(selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = state.toValuesBlock(selected, ctx.driverContext()); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumLongGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumLongGroupingAggregatorFunction.java index 31779335e80c0..80d2209ee4fe0 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumLongGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/SumLongGroupingAggregatorFunction.java @@ -289,8 +289,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = state.toValuesBlock(selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = state.toValuesBlock(selected, ctx.driverContext()); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopBooleanGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopBooleanGroupingAggregatorFunction.java index f6238670a776a..f7cc8f2ba062b 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopBooleanGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopBooleanGroupingAggregatorFunction.java @@ -269,8 +269,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = TopBooleanAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = TopBooleanAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopBytesRefGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopBytesRefGroupingAggregatorFunction.java index 12f1456327264..1c49c8890c26c 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopBytesRefGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopBytesRefGroupingAggregatorFunction.java @@ -279,8 +279,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = TopBytesRefAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = TopBytesRefAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopDoubleGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopDoubleGroupingAggregatorFunction.java index 11ba0cbea0d6b..3bd8ec8fa9801 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopDoubleGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopDoubleGroupingAggregatorFunction.java @@ -269,8 +269,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = TopDoubleAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = TopDoubleAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopFloatGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopFloatGroupingAggregatorFunction.java index 32dfcaaffcde9..4e7eba0027810 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopFloatGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopFloatGroupingAggregatorFunction.java @@ -269,8 +269,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = TopFloatAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = TopFloatAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopIntGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopIntGroupingAggregatorFunction.java index 1a0dea4b8d0eb..0ea18a3118c6d 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopIntGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopIntGroupingAggregatorFunction.java @@ -268,8 +268,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = TopIntAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = TopIntAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopIpGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopIpGroupingAggregatorFunction.java index ad0e75b625e3d..0026fa15cbff1 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopIpGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopIpGroupingAggregatorFunction.java @@ -279,8 +279,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = TopIpAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = TopIpAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopLongGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopLongGroupingAggregatorFunction.java index 71e17e29be5fb..494d0bb51cb10 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopLongGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/TopLongGroupingAggregatorFunction.java @@ -269,8 +269,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = TopLongAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = TopLongAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesBooleanGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesBooleanGroupingAggregatorFunction.java index 896d037cf68fb..e8cd576001709 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesBooleanGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesBooleanGroupingAggregatorFunction.java @@ -262,8 +262,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = ValuesBooleanAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = ValuesBooleanAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesBytesRefGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesBytesRefGroupingAggregatorFunction.java index b76f52d335a03..3f104fb548f8b 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesBytesRefGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesBytesRefGroupingAggregatorFunction.java @@ -248,8 +248,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = ValuesBytesRefAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = ValuesBytesRefAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesDoubleGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesDoubleGroupingAggregatorFunction.java index 3a35f48fee5f8..b10a918f3fd4c 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesDoubleGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesDoubleGroupingAggregatorFunction.java @@ -262,8 +262,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = ValuesDoubleAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = ValuesDoubleAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesFloatGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesFloatGroupingAggregatorFunction.java index 4917f61a23f8d..556bba8be88f8 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesFloatGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesFloatGroupingAggregatorFunction.java @@ -262,8 +262,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = ValuesFloatAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = ValuesFloatAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesIntGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesIntGroupingAggregatorFunction.java index d0e094099af4e..dcb05cfe37635 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesIntGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesIntGroupingAggregatorFunction.java @@ -261,8 +261,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = ValuesIntAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = ValuesIntAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesLongGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesLongGroupingAggregatorFunction.java index 287013a1dc136..18f706b974101 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesLongGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/ValuesLongGroupingAggregatorFunction.java @@ -262,8 +262,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = ValuesLongAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = ValuesLongAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidCartesianPointDocValuesGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidCartesianPointDocValuesGroupingAggregatorFunction.java index 5116ea389510a..75dc0bbe3ea03 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidCartesianPointDocValuesGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidCartesianPointDocValuesGroupingAggregatorFunction.java @@ -335,8 +335,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SpatialCentroidCartesianPointDocValuesAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SpatialCentroidCartesianPointDocValuesAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidCartesianPointSourceValuesGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidCartesianPointSourceValuesGroupingAggregatorFunction.java index e0508288abbe3..48b970dbe574c 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidCartesianPointSourceValuesGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidCartesianPointSourceValuesGroupingAggregatorFunction.java @@ -344,8 +344,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SpatialCentroidCartesianPointSourceValuesAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SpatialCentroidCartesianPointSourceValuesAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidGeoPointDocValuesGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidGeoPointDocValuesGroupingAggregatorFunction.java index 23936066d214b..5c120e539dcae 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidGeoPointDocValuesGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidGeoPointDocValuesGroupingAggregatorFunction.java @@ -335,8 +335,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SpatialCentroidGeoPointDocValuesAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SpatialCentroidGeoPointDocValuesAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidGeoPointSourceValuesGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidGeoPointSourceValuesGroupingAggregatorFunction.java index 2707f5c78cf62..b50f9c36b8f3b 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidGeoPointSourceValuesGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialCentroidGeoPointSourceValuesGroupingAggregatorFunction.java @@ -344,8 +344,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SpatialCentroidGeoPointSourceValuesAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SpatialCentroidGeoPointSourceValuesAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianPointDocValuesGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianPointDocValuesGroupingAggregatorFunction.java index 17c887a5e0035..c00051755cdf2 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianPointDocValuesGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianPointDocValuesGroupingAggregatorFunction.java @@ -318,8 +318,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SpatialExtentCartesianPointDocValuesAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SpatialExtentCartesianPointDocValuesAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianPointSourceValuesGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianPointSourceValuesGroupingAggregatorFunction.java index 1c4169263e9f0..f52b8ec855117 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianPointSourceValuesGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianPointSourceValuesGroupingAggregatorFunction.java @@ -325,8 +325,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SpatialExtentCartesianPointSourceValuesAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SpatialExtentCartesianPointSourceValuesAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianShapeDocValuesGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianShapeDocValuesGroupingAggregatorFunction.java index d9d834d96c2c6..6bca1ac2b3437 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianShapeDocValuesGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianShapeDocValuesGroupingAggregatorFunction.java @@ -299,8 +299,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SpatialExtentCartesianShapeDocValuesAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SpatialExtentCartesianShapeDocValuesAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianShapeSourceValuesGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianShapeSourceValuesGroupingAggregatorFunction.java index c568de2dbd6be..7d633c3e90850 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianShapeSourceValuesGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentCartesianShapeSourceValuesGroupingAggregatorFunction.java @@ -325,8 +325,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SpatialExtentCartesianShapeSourceValuesAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SpatialExtentCartesianShapeSourceValuesAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoPointDocValuesGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoPointDocValuesGroupingAggregatorFunction.java index e80e6d4391dc3..d8421eac6d9c2 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoPointDocValuesGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoPointDocValuesGroupingAggregatorFunction.java @@ -350,8 +350,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SpatialExtentGeoPointDocValuesAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SpatialExtentGeoPointDocValuesAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoPointSourceValuesGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoPointSourceValuesGroupingAggregatorFunction.java index 43a2662a229c4..d65282b81fda9 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoPointSourceValuesGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoPointSourceValuesGroupingAggregatorFunction.java @@ -357,8 +357,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SpatialExtentGeoPointSourceValuesAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SpatialExtentGeoPointSourceValuesAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoShapeDocValuesGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoShapeDocValuesGroupingAggregatorFunction.java index 6ad4a92e83c7e..a532b40479ecf 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoShapeDocValuesGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoShapeDocValuesGroupingAggregatorFunction.java @@ -331,8 +331,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SpatialExtentGeoShapeDocValuesAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SpatialExtentGeoShapeDocValuesAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoShapeSourceValuesGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoShapeSourceValuesGroupingAggregatorFunction.java index 7d8f8fefc722b..57fca5af50059 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoShapeSourceValuesGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/spatial/SpatialExtentGeoShapeSourceValuesGroupingAggregatorFunction.java @@ -357,8 +357,8 @@ public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) @Override public void evaluateFinal(Block[] blocks, int offset, IntVector selected, - GroupingAggregatorEvaluationContext evaluatorContext) { - blocks[offset] = SpatialExtentGeoShapeSourceValuesAggregator.evaluateFinal(state, selected, evaluatorContext.driverContext()); + GroupingAggregatorEvaluationContext ctx) { + blocks[offset] = SpatialExtentGeoShapeSourceValuesAggregator.evaluateFinal(state, selected, ctx); } @Override diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctBooleanAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctBooleanAggregator.java index 033ac62e45fd4..e1ff14fcebb67 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctBooleanAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctBooleanAggregator.java @@ -55,8 +55,8 @@ public static void combineIntermediate(GroupingState current, int groupId, boole if (tbit) current.bits.set(groupId * 2 + 1); } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(selected.getPositionCount()); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + LongBlock.Builder builder = ctx.blockFactory().newLongBlockBuilder(selected.getPositionCount()); for (int i = 0; i < selected.getPositionCount(); i++) { int group = selected.getInt(i); long count = (state.bits.get(2 * group) ? 1 : 0) + (state.bits.get(2 * group + 1) ? 1 : 0); diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctBytesRefAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctBytesRefAggregator.java index 84b7f4558b9e9..35e64f062b41d 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctBytesRefAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctBytesRefAggregator.java @@ -50,8 +50,8 @@ public static void combineIntermediate(HllStates.GroupingState current, int grou current.merge(groupId, inValue, 0); } - public static Block evaluateFinal(HllStates.GroupingState state, IntVector selected, DriverContext driverContext) { - try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(selected.getPositionCount())) { + public static Block evaluateFinal(HllStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + try (LongBlock.Builder builder = ctx.blockFactory().newLongBlockBuilder(selected.getPositionCount())) { for (int i = 0; i < selected.getPositionCount(); i++) { int group = selected.getInt(i); long count = state.cardinality(group); diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctDoubleAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctDoubleAggregator.java index ef001408bdf63..b748c423232e6 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctDoubleAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctDoubleAggregator.java @@ -50,8 +50,8 @@ public static void combineIntermediate(HllStates.GroupingState current, int grou current.merge(groupId, inValue, 0); } - public static Block evaluateFinal(HllStates.GroupingState state, IntVector selected, DriverContext driverContext) { - try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(selected.getPositionCount())) { + public static Block evaluateFinal(HllStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + try (LongBlock.Builder builder = ctx.blockFactory().newLongBlockBuilder(selected.getPositionCount())) { for (int i = 0; i < selected.getPositionCount(); i++) { int group = selected.getInt(i); long count = state.cardinality(group); diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctFloatAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctFloatAggregator.java index e744bea7bf338..b3ba657795882 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctFloatAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctFloatAggregator.java @@ -50,8 +50,8 @@ public static void combineIntermediate(HllStates.GroupingState current, int grou current.merge(groupId, inValue, 0); } - public static Block evaluateFinal(HllStates.GroupingState state, IntVector selected, DriverContext driverContext) { - try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(selected.getPositionCount())) { + public static Block evaluateFinal(HllStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + try (LongBlock.Builder builder = ctx.blockFactory().newLongBlockBuilder(selected.getPositionCount())) { for (int i = 0; i < selected.getPositionCount(); i++) { int group = selected.getInt(i); long count = state.cardinality(group); diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctIntAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctIntAggregator.java index e87e9e5a593ab..21a236cef8054 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctIntAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctIntAggregator.java @@ -50,8 +50,8 @@ public static void combineIntermediate(HllStates.GroupingState current, int grou current.merge(groupId, inValue, 0); } - public static Block evaluateFinal(HllStates.GroupingState state, IntVector selected, DriverContext driverContext) { - try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(selected.getPositionCount())) { + public static Block evaluateFinal(HllStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + try (LongBlock.Builder builder = ctx.blockFactory().newLongBlockBuilder(selected.getPositionCount())) { for (int i = 0; i < selected.getPositionCount(); i++) { int group = selected.getInt(i); long count = state.cardinality(group); diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctLongAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctLongAggregator.java index ccdc1c289d5fe..7ae1d674588ac 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctLongAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/CountDistinctLongAggregator.java @@ -50,8 +50,8 @@ public static void combineIntermediate(HllStates.GroupingState current, int grou current.merge(groupId, inValue, 0); } - public static Block evaluateFinal(HllStates.GroupingState state, IntVector selected, DriverContext driverContext) { - try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(selected.getPositionCount())) { + public static Block evaluateFinal(HllStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + try (LongBlock.Builder builder = ctx.blockFactory().newLongBlockBuilder(selected.getPositionCount())) { for (int i = 0; i < selected.getPositionCount(); i++) { int group = selected.getInt(i); long count = state.cardinality(group); diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MaxBytesRefAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MaxBytesRefAggregator.java index 7d731c1e9ac0c..997ee5c098ce9 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MaxBytesRefAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MaxBytesRefAggregator.java @@ -62,8 +62,8 @@ public static void combineIntermediate(GroupingState state, int groupId, BytesRe } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(selected, driverContext); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(selected, ctx.driverContext()); } public static class GroupingState implements GroupingAggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MaxIpAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MaxIpAggregator.java index d8c8146f09807..c7c48814546e9 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MaxIpAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MaxIpAggregator.java @@ -58,8 +58,8 @@ public static void combineIntermediate(GroupingState state, int groupId, BytesRe } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(selected, driverContext); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(selected, ctx.driverContext()); } public static class GroupingState implements GroupingAggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationDoubleAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationDoubleAggregator.java index 7a195613fdb08..3e97544ea9156 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationDoubleAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationDoubleAggregator.java @@ -47,7 +47,7 @@ public static void combineIntermediate(QuantileStates.GroupingState state, int g state.add(groupId, inValue); } - public static Block evaluateFinal(QuantileStates.GroupingState state, IntVector selected, DriverContext driverContext) { - return state.evaluateMedianAbsoluteDeviation(selected, driverContext); + public static Block evaluateFinal(QuantileStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateMedianAbsoluteDeviation(selected, ctx.driverContext()); } } diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationFloatAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationFloatAggregator.java index 2b07899174ebd..dfabf0ba89090 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationFloatAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationFloatAggregator.java @@ -48,7 +48,7 @@ public static void combineIntermediate(QuantileStates.GroupingState state, int g state.add(groupId, inValue); } - public static Block evaluateFinal(QuantileStates.GroupingState state, IntVector selected, DriverContext driverContext) { - return state.evaluateMedianAbsoluteDeviation(selected, driverContext); + public static Block evaluateFinal(QuantileStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateMedianAbsoluteDeviation(selected, ctx.driverContext()); } } diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationIntAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationIntAggregator.java index f1482cba2949c..36665480ae3d1 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationIntAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationIntAggregator.java @@ -47,7 +47,7 @@ public static void combineIntermediate(QuantileStates.GroupingState state, int g state.add(groupId, inValue); } - public static Block evaluateFinal(QuantileStates.GroupingState state, IntVector selected, DriverContext driverContext) { - return state.evaluateMedianAbsoluteDeviation(selected, driverContext); + public static Block evaluateFinal(QuantileStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateMedianAbsoluteDeviation(selected, ctx.driverContext()); } } diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationLongAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationLongAggregator.java index 7867a6ccebd21..df53cd534c58b 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationLongAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MedianAbsoluteDeviationLongAggregator.java @@ -47,7 +47,7 @@ public static void combineIntermediate(QuantileStates.GroupingState state, int g state.add(groupId, inValue); } - public static Block evaluateFinal(QuantileStates.GroupingState state, IntVector selected, DriverContext driverContext) { - return state.evaluateMedianAbsoluteDeviation(selected, driverContext); + public static Block evaluateFinal(QuantileStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateMedianAbsoluteDeviation(selected, ctx.driverContext()); } } diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MinBytesRefAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MinBytesRefAggregator.java index 142deb4058f3e..14edd6ec72d3e 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MinBytesRefAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MinBytesRefAggregator.java @@ -62,8 +62,8 @@ public static void combineIntermediate(GroupingState state, int groupId, BytesRe } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(selected, driverContext); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(selected, ctx.driverContext()); } public static class GroupingState implements GroupingAggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MinIpAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MinIpAggregator.java index c5cbdab2c68a5..1445b6a3d51c3 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MinIpAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/MinIpAggregator.java @@ -58,8 +58,8 @@ public static void combineIntermediate(GroupingState state, int groupId, BytesRe } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(selected, driverContext); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(selected, ctx.driverContext()); } public static class GroupingState implements GroupingAggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileDoubleAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileDoubleAggregator.java index 7b20903907806..10e7501708970 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileDoubleAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileDoubleAggregator.java @@ -47,7 +47,7 @@ public static void combineIntermediate(QuantileStates.GroupingState state, int g state.add(groupId, inValue); } - public static Block evaluateFinal(QuantileStates.GroupingState state, IntVector selected, DriverContext driverContext) { - return state.evaluatePercentile(selected, driverContext); + public static Block evaluateFinal(QuantileStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluatePercentile(selected, ctx.driverContext()); } } diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileFloatAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileFloatAggregator.java index 07feae7afa9bd..b1ee245b6059d 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileFloatAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileFloatAggregator.java @@ -47,7 +47,7 @@ public static void combineIntermediate(QuantileStates.GroupingState state, int g state.add(groupId, inValue); } - public static Block evaluateFinal(QuantileStates.GroupingState state, IntVector selected, DriverContext driverContext) { - return state.evaluatePercentile(selected, driverContext); + public static Block evaluateFinal(QuantileStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluatePercentile(selected, ctx.driverContext()); } } diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileIntAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileIntAggregator.java index f814b6d43d148..9c9982b1e713b 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileIntAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileIntAggregator.java @@ -47,7 +47,7 @@ public static void combineIntermediate(QuantileStates.GroupingState state, int g state.add(groupId, inValue); } - public static Block evaluateFinal(QuantileStates.GroupingState state, IntVector selected, DriverContext driverContext) { - return state.evaluatePercentile(selected, driverContext); + public static Block evaluateFinal(QuantileStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluatePercentile(selected, ctx.driverContext()); } } diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileLongAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileLongAggregator.java index 4814f3d25ac5c..335da9864c64f 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileLongAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/PercentileLongAggregator.java @@ -47,7 +47,11 @@ public static void combineIntermediate(QuantileStates.GroupingState state, int g state.add(groupId, inValue); } - public static Block evaluateFinal(QuantileStates.GroupingState state, IntVector selectedGroups, DriverContext driverContext) { - return state.evaluatePercentile(selectedGroups, driverContext); + public static Block evaluateFinal( + QuantileStates.GroupingState state, + IntVector selectedGroups, + GroupingAggregatorEvaluationContext ctx + ) { + return state.evaluatePercentile(selectedGroups, ctx.driverContext()); } } diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/SumDoubleAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/SumDoubleAggregator.java index d3ad2c07ac7ef..58b12c6447539 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/SumDoubleAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/SumDoubleAggregator.java @@ -105,8 +105,8 @@ public static void evaluateIntermediate( } } - public static Block evaluateFinal(GroupingSumState state, IntVector selected, DriverContext driverContext) { - try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(selected.getPositionCount())) { + public static Block evaluateFinal(GroupingSumState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + try (DoubleBlock.Builder builder = ctx.blockFactory().newDoubleBlockBuilder(selected.getPositionCount())) { for (int i = 0; i < selected.getPositionCount(); i++) { int si = selected.getInt(i); if (state.hasValue(si) && si < state.values.size()) { diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/ValuesBooleanAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/ValuesBooleanAggregator.java index c070d02de627e..464379ff20b6e 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/ValuesBooleanAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/ValuesBooleanAggregator.java @@ -66,8 +66,8 @@ public static void combineIntermediate(GroupingState state, int groupId, Boolean } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(driverContext.blockFactory(), selected); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(ctx.blockFactory(), selected); } public static class SingleState implements AggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-RateAggregator.java.st b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-RateAggregator.java.st index 748fc6b99a5ab..2f1b6f444f450 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-RateAggregator.java.st +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-RateAggregator.java.st @@ -7,6 +7,7 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.apache.lucene.util.Accountable; import org.apache.lucene.util.RamUsageEstimator; import org.elasticsearch.common.breaker.CircuitBreaker; @@ -18,16 +19,14 @@ import org.elasticsearch.compute.data.Block; import org.elasticsearch.compute.data.BlockFactory; import org.elasticsearch.compute.data.DoubleBlock; import org.elasticsearch.compute.data.DoubleVector; -$if(float)$ import org.elasticsearch.compute.data.FloatBlock; -$elseif(int)$ import org.elasticsearch.compute.data.IntBlock; -$endif$ import org.elasticsearch.compute.data.IntVector; import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasable; import org.elasticsearch.core.Releasables; +// end generated imports /** * A rate grouping aggregation definition for $type$. diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-SampleAggregator.java.st b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-SampleAggregator.java.st index 46de952d5c7c5..d4f2698c4197d 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-SampleAggregator.java.st +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-SampleAggregator.java.st @@ -84,8 +84,8 @@ class Sample$Type$Aggregator { } } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return stripWeights(driverContext, state.toBlock(driverContext.blockFactory(), selected)); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return stripWeights(ctx.driverContext(), state.toBlock(ctx.blockFactory(), selected)); } private static Block stripWeights(DriverContext driverContext, Block block) { diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-StdDevAggregator.java.st b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-StdDevAggregator.java.st index 4338b1e5aee9b..5cb3197ce0e3c 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-StdDevAggregator.java.st +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-StdDevAggregator.java.st @@ -56,7 +56,7 @@ public class StdDev$Type$Aggregator { state.combine(groupId, mean, m2, count); } - public static Block evaluateFinal(StdDevStates.GroupingState state, IntVector selected, DriverContext driverContext) { - return state.evaluateFinal(selected, driverContext); + public static Block evaluateFinal(StdDevStates.GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateFinal(selected, ctx.driverContext()); } } diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-TopAggregator.java.st b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-TopAggregator.java.st index 839fc69c6645f..f2ad759a6d57f 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-TopAggregator.java.st +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-TopAggregator.java.st @@ -7,29 +7,23 @@ package org.elasticsearch.compute.aggregation; -$if(BytesRef || Ip)$ +// begin generated imports import org.apache.lucene.util.BytesRef; -$endif$ -$if(BytesRef)$ import org.elasticsearch.common.breaker.CircuitBreaker; -$endif$ import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.compute.ann.Aggregator; import org.elasticsearch.compute.ann.GroupingAggregator; import org.elasticsearch.compute.ann.IntermediateState; import org.elasticsearch.compute.data.Block; import org.elasticsearch.compute.data.BlockFactory; -$if(!long)$ import org.elasticsearch.compute.data.$Type$Block; -$endif$ import org.elasticsearch.compute.data.IntVector; -$if(long)$ import org.elasticsearch.compute.data.$Type$Block; -$endif$ import org.elasticsearch.compute.data.sort.$Name$BucketedSort; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; import org.elasticsearch.search.sort.SortOrder; +// end generated imports /** * Aggregates the top N field values for $type$. @@ -90,8 +84,8 @@ $else$ $endif$ } - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(driverContext.blockFactory(), selected); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(ctx.blockFactory(), selected); } public static class GroupingState implements GroupingAggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-ValueOverTimeAggregator.java.st b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-ValueOverTimeAggregator.java.st index b517443ce8736..d52ae67471dae 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-ValueOverTimeAggregator.java.st +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-ValueOverTimeAggregator.java.st @@ -7,21 +7,19 @@ package org.elasticsearch.compute.aggregation; +// begin generated imports import org.elasticsearch.common.util.BigArrays; -$if(int||double||float)$ import org.elasticsearch.common.util.$Type$Array; -$endif$ import org.elasticsearch.common.util.LongArray; import org.elasticsearch.compute.ann.GroupingAggregator; import org.elasticsearch.compute.ann.IntermediateState; import org.elasticsearch.compute.data.Block; -$if(int||double||float)$ import org.elasticsearch.compute.data.$Type$Block; -$endif$ import org.elasticsearch.compute.data.IntVector; import org.elasticsearch.compute.data.LongBlock; import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.core.Releasables; +// end generated imports /** * A time-series aggregation function that collects the $Occurrence$ occurrence value of a time series in a specified interval. @@ -59,8 +57,8 @@ public class $Occurrence$OverTime$Type$Aggregator { } } - public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext evalContext) { - return state.evaluateFinal(selected, evalContext); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.evaluateFinal(selected, ctx); } public static final class GroupingState extends AbstractArrayState { diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-ValuesAggregator.java.st b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-ValuesAggregator.java.st index 3641a17ce6972..7f34d84ec08f3 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-ValuesAggregator.java.st +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-ValuesAggregator.java.st @@ -120,8 +120,8 @@ $else$ } $endif$ - public static Block evaluateFinal(GroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(driverContext.blockFactory(), selected); + public static Block evaluateFinal(GroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(ctx.blockFactory(), selected); } public static class SingleState implements AggregatorState { diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/spatial/CentroidPointAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/spatial/CentroidPointAggregator.java index b4df19cddae97..ca2ecc6dda2d2 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/spatial/CentroidPointAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/spatial/CentroidPointAggregator.java @@ -12,6 +12,7 @@ import org.elasticsearch.common.util.DoubleArray; import org.elasticsearch.common.util.LongArray; import org.elasticsearch.compute.aggregation.AggregatorState; +import org.elasticsearch.compute.aggregation.GroupingAggregatorEvaluationContext; import org.elasticsearch.compute.aggregation.GroupingAggregatorState; import org.elasticsearch.compute.aggregation.SeenGroupIds; import org.elasticsearch.compute.data.Block; @@ -117,8 +118,8 @@ public static void evaluateIntermediate( } } - public static Block evaluateFinal(GroupingCentroidState state, IntVector selected, DriverContext driverContext) { - try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(selected.getPositionCount())) { + public static Block evaluateFinal(GroupingCentroidState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + try (BytesRefBlock.Builder builder = ctx.blockFactory().newBytesRefBlockBuilder(selected.getPositionCount())) { for (int i = 0; i < selected.getPositionCount(); i++) { int si = selected.getInt(i); if (state.hasValue(si) && si < state.xValues.size()) { diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/spatial/SpatialExtentAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/spatial/SpatialExtentAggregator.java index ac32abac23898..45c718b510378 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/spatial/SpatialExtentAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/spatial/SpatialExtentAggregator.java @@ -7,6 +7,7 @@ package org.elasticsearch.compute.aggregation.spatial; +import org.elasticsearch.compute.aggregation.GroupingAggregatorEvaluationContext; import org.elasticsearch.compute.data.Block; import org.elasticsearch.compute.data.IntVector; import org.elasticsearch.compute.operator.DriverContext; @@ -26,7 +27,7 @@ public static Block evaluateFinal(SpatialExtentState state, DriverContext driver return state.toBlock(driverContext); } - public static Block evaluateFinal(SpatialExtentGroupingState state, IntVector selected, DriverContext driverContext) { - return state.toBlock(selected, driverContext); + public static Block evaluateFinal(SpatialExtentGroupingState state, IntVector selected, GroupingAggregatorEvaluationContext ctx) { + return state.toBlock(selected, ctx.driverContext()); } } diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/spatial/SpatialExtentLongitudeWrappingAggregator.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/spatial/SpatialExtentLongitudeWrappingAggregator.java index c15761d451f5b..760cca96bfedf 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/spatial/SpatialExtentLongitudeWrappingAggregator.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/spatial/SpatialExtentLongitudeWrappingAggregator.java @@ -7,6 +7,7 @@ package org.elasticsearch.compute.aggregation.spatial; +import org.elasticsearch.compute.aggregation.GroupingAggregatorEvaluationContext; import org.elasticsearch.compute.data.Block; import org.elasticsearch.compute.data.IntVector; import org.elasticsearch.compute.operator.DriverContext; @@ -46,8 +47,8 @@ public static Block evaluateFinal(SpatialExtentStateWrappedLongitudeState state, public static Block evaluateFinal( SpatialExtentGroupingStateWrappedLongitudeState state, IntVector selected, - DriverContext driverContext + GroupingAggregatorEvaluationContext ctx ) { - return state.toBlock(selected, driverContext); + return state.toBlock(selected, ctx.driverContext()); } }