File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
compute/src/main/java/org/elasticsearch/compute/data Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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} "
You can’t perform that action at this time.
0 commit comments