Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,6 @@ tests:
- class: org.elasticsearch.readiness.ReadinessClusterIT
method: testReadinessDuringRestartsNormalOrder
issue: https://github.com/elastic/elasticsearch/issues/136955
- class: org.elasticsearch.xpack.esql.expression.function.aggregate.DimensionValuesByteRefGroupingAggregatorFunctionTests
method: testSimple
issue: https://github.com/elastic/elasticsearch/issues/137378
- class: org.elasticsearch.xpack.ilm.TimeSeriesDataStreamsIT
method: testSearchableSnapshotAction
issue: https://github.com/elastic/elasticsearch/issues/137167
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,16 +237,17 @@ public void addIntermediateInput(int positionOffset, IntVector groups, Page page
@Override
public void evaluateIntermediate(Block[] blocks, int offset, IntVector selected) {
int positionCount = selected.getPositionCount();
boolean allSelected = positionCount == maxGroupId + 1;
boolean allSelected = positionCount > maxGroupId;
if (allSelected) {
for (int i = 0; i < selected.getPositionCount(); i++) {
if (selected.getInt(i) == i) {
if (selected.getInt(i) != i) {
allSelected = false;
break;
}
}
}
if (allSelected) {
fillNullsUpTo(positionCount);
blocks[offset] = builder.build();
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,17 @@ public void testSimple() {
randomFrom(AggregatorMode.INITIAL, AggregatorMode.SINGLE),
List.of(0)
);
final List<BlockHash.GroupSpec> groupSpecs;
if (randomBoolean()) {
// Use IntBlockHash; reserves 0 for null values
groupSpecs = List.of(new BlockHash.GroupSpec(1, ElementType.INT));
} else {
// Use PackedValuesBlockHash; does not reserve 0 for null values
groupSpecs = List.of(new BlockHash.GroupSpec(1, ElementType.INT), new BlockHash.GroupSpec(1, ElementType.INT));
}
HashAggregationOperator hashAggregationOperator = new HashAggregationOperator(
List.of(aggregatorFactory),
() -> BlockHash.build(
List.of(new BlockHash.GroupSpec(1, ElementType.INT)),
driverContext.blockFactory(),
randomIntBetween(1, 1024),
randomBoolean()
),
() -> BlockHash.build(groupSpecs, driverContext.blockFactory(), randomIntBetween(1, 1024), randomBoolean()),
driverContext
);
List<Page> outputPages = new ArrayList<>();
Expand All @@ -99,7 +102,7 @@ public void testSimple() {
Map<Integer, List<BytesRef>> actualValues = new HashMap<>();
for (Page out : outputPages) {
IntBlock groups = out.getBlock(0);
BytesRefBlock valuesBlock = out.getBlock(1);
BytesRefBlock valuesBlock = out.getBlock(groupSpecs.size());
for (int p = 0; p < out.getPositionCount(); p++) {
int group = groups.getInt(p);
int valueCount = valuesBlock.getValueCount(p);
Expand Down