Skip to content

Commit e7b8327

Browse files
authored
Fix SampleXXXAggregatorFunctionTests.testSimpleWithCranky test (elastic#135261)
1 parent 75901a1 commit e7b8327

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

muted-tests.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -552,9 +552,6 @@ tests:
552552
- class: org.elasticsearch.reservedstate.service.RepositoriesFileSettingsIT
553553
method: testSettingsApplied
554554
issue: https://github.com/elastic/elasticsearch/issues/126748
555-
- class: org.elasticsearch.compute.aggregation.SampleLongAggregatorFunctionTests
556-
method: testSimpleWithCranky
557-
issue: https://github.com/elastic/elasticsearch/issues/134978
558555
- class: org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT
559556
method: test {csv-spec:stats.CountDistinctWithConditions}
560557
issue: https://github.com/elastic/elasticsearch/issues/134984
@@ -591,9 +588,6 @@ tests:
591588
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
592589
method: test {p0=transform/transforms_start_stop/Test stop transform with force and wait_for_checkpoint true}
593590
issue: https://github.com/elastic/elasticsearch/issues/135135
594-
- class: org.elasticsearch.compute.aggregation.SampleIntAggregatorFunctionTests
595-
method: testSimpleWithCranky
596-
issue: https://github.com/elastic/elasticsearch/issues/135137
597591
- class: org.elasticsearch.lucene.RollingUpgradeSearchableSnapshotIndexCompatibilityIT
598592
method: testSearchableSnapshotUpgrade {p0=[9.2.0, 9.2.0, 9.2.0]}
599593
issue: https://github.com/elastic/elasticsearch/issues/135150
@@ -603,18 +597,12 @@ tests:
603597
- class: org.elasticsearch.discovery.ClusterDisruptionIT
604598
method: testAckedIndexing
605599
issue: https://github.com/elastic/elasticsearch/issues/117024
606-
- class: org.elasticsearch.compute.aggregation.SampleBytesRefAggregatorFunctionTests
607-
method: testSimpleWithCranky
608-
issue: https://github.com/elastic/elasticsearch/issues/135157
609600
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
610601
method: test {p0=analytics/nested_top_metrics_sort/terms order by top metrics numeric not null double values}
611602
issue: https://github.com/elastic/elasticsearch/issues/135159
612603
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
613604
method: test {p0=analytics/nested_top_metrics_sort/terms order by top metrics numeric not null integer values}
614605
issue: https://github.com/elastic/elasticsearch/issues/135162
615-
- class: org.elasticsearch.compute.aggregation.SampleBooleanAggregatorFunctionTests
616-
method: testSimpleWithCranky
617-
issue: https://github.com/elastic/elasticsearch/issues/135163
618606
- class: org.elasticsearch.test.rest.yaml.CcsCommonYamlTestSuiteIT
619607
method: test {p0=search/160_exists_query/Test exists query on mapped geo_point field with no doc values}
620608
issue: https://github.com/elastic/elasticsearch/issues/135164
@@ -624,9 +612,6 @@ tests:
624612
- class: org.elasticsearch.compute.operator.topn.TopNOperatorTests
625613
method: testSimpleWithCranky
626614
issue: https://github.com/elastic/elasticsearch/issues/135224
627-
- class: org.elasticsearch.compute.aggregation.SampleDoubleAggregatorFunctionTests
628-
method: testSimpleWithCranky
629-
issue: https://github.com/elastic/elasticsearch/issues/135239
630615
- class: org.elasticsearch.compute.operator.topn.TopNOperatorTests
631616
method: testSimpleCircuitBreaking
632617
issue: https://github.com/elastic/elasticsearch/issues/135260

x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/sort/BytesRefBucketedSort.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,9 @@ public Block toBlock(BlockFactory blockFactory, IntVector selected) {
203203
if (size == 1) {
204204
try (BreakingBytesRefBuilder bytes = values.get(start)) {
205205
builder.appendBytesRef(bytes.bytesRefView());
206+
} finally {
207+
values.set(start, null);
206208
}
207-
values.set(start, null);
208209
continue;
209210
}
210211

@@ -218,8 +219,9 @@ public Block toBlock(BlockFactory blockFactory, IntVector selected) {
218219
for (int i = 0; i < size; i++) {
219220
try (BreakingBytesRefBuilder bytes = values.get(start + i)) {
220221
builder.appendBytesRef(bytes.bytesRefView());
222+
} finally {
223+
values.set(start + i, null);
221224
}
222-
values.set(start + i, null);
223225
}
224226
builder.endPositionEntry();
225227
}

0 commit comments

Comments
 (0)