Skip to content

Commit d83f9dd

Browse files
committed
writeTypedBlock one-by-one because it doesnt work otherwise for some reason
1 parent 3c5e329 commit d83f9dd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,10 @@ public AggregateMetricDoubleBlock expand() {
241241
@Override
242242
public void writeTo(StreamOutput out) throws IOException {
243243
if (out.getTransportVersion().supports(ESQL_AGGREGATE_METRIC_DOUBLE_SERIALIZE_NULL_BLOCK_FIX)) {
244-
for (Block block : List.of(minBlock, maxBlock, sumBlock, countBlock)) {
245-
Block.writeTypedBlock(block, out);
246-
}
244+
Block.writeTypedBlock(minBlock, out);
245+
Block.writeTypedBlock(maxBlock, out);
246+
Block.writeTypedBlock(sumBlock, out);
247+
Block.writeTypedBlock(countBlock, out);
247248
} else {
248249
for (Block block : List.of(minBlock, maxBlock, sumBlock, countBlock)) {
249250
block.writeTo(out);

0 commit comments

Comments
 (0)