Skip to content

Commit 89a8bcf

Browse files
committed
Minor fix and added some docs
1 parent 32588b5 commit 89a8bcf

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/aggregation/GroupingAggregatorFunctionTestCase.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,14 @@ public String describe() {
781781
};
782782
}
783783

784+
/**
785+
* Custom {@link HashAggregationOperator.HashAggregationOperatorFactory} implementation that
786+
* randomizes the GroupIds block type passed to AddInput.
787+
* <p>
788+
* This helps testing the different overloads of
789+
* {@link org.elasticsearch.compute.aggregation.GroupingAggregatorFunction.AddInput#add}
790+
* </p>
791+
*/
784792
private record RandomizingHashAggregationOperatorFactory(
785793
List<BlockHash.GroupSpec> groups,
786794
AggregatorMode aggregatorMode,

x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/data/BlockTypeRandomizer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static IntBlock randomizeBlockType(IntBlock block) {
7272
// IntArrayBlock
7373
//
7474
if (randomIntBetween(0, --classCount) == 0) {
75-
if (block instanceof IntVectorBlock) {
75+
if (block instanceof IntArrayBlock) {
7676
return block;
7777
}
7878

0 commit comments

Comments
 (0)