Skip to content

Commit e470f7d

Browse files
committed
Cleanup dependencies and BlockUtils
1 parent 0f32a64 commit e470f7d

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,11 @@ yield new AggregateMetricDoubleLiteral(
303303
aggBlock.countBlock().getInt(offset)
304304
);
305305
}
306-
case EXPONENTIAL_HISTOGRAM -> ExponentialHistogram.merge(
307-
// TODO: do a cleaner copy with builder here
308-
100,
309-
ExponentialHistogramCircuitBreaker.noop(),
310-
((ExponentialHistogramArrayBlock) block).getExponentialHistogram(offset)
311-
);
306+
case EXPONENTIAL_HISTOGRAM -> {
307+
ExponentialHistogram histogram = ((ExponentialHistogramArrayBlock) block).getExponentialHistogram(offset);
308+
// return a copy so that the returned value is not bound to the lifetime of the block
309+
yield ExponentialHistogram.builder(histogram, ExponentialHistogramCircuitBreaker.noop()).build();
310+
}
312311
case UNKNOWN -> throw new IllegalArgumentException("can't read values from [" + block + "]");
313312
};
314313
}

x-pack/plugin/esql/qa/testFixtures/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ dependencies {
99
implementation project(':client:rest')
1010
implementation project(':libs:logging')
1111
implementation project(':test:framework')
12-
implementation project(":libs:exponential-histogram")
1312
api(testArtifact(project(xpackModule('esql-core'))))
1413
implementation project(':server')
1514
implementation "net.sf.supercsv:super-csv:${versions.supercsv}"

0 commit comments

Comments
 (0)