Fix test bug in auto_date_histo
The test would try to prepare a `Rounding` even when there aren't any buckets. This would fail because there is no range over which to prepare the rounding. It turns out that we don't need the rounding in that case so we just use `null` then. Closes #59131
This commit is contained in:
parent
e343e066fc
commit
d536854879
|
@ -155,7 +155,7 @@ public class InternalAutoDateHistogramTests extends InternalMultiBucketAggregati
|
|||
|
||||
int roundingIndex = reduced.getBucketInfo().roundingIdx;
|
||||
RoundingInfo roundingInfo = AutoDateHistogramAggregationBuilder.buildRoundings(null, null)[roundingIndex];
|
||||
Rounding.Prepared prepared = roundingInfo.rounding.prepare(lowest, highest);
|
||||
Rounding.Prepared prepared = totalBucketConut > 0 ? roundingInfo.rounding.prepare(lowest, highest) : null;
|
||||
|
||||
long normalizedDuration = (highest - lowest) / roundingInfo.getRoughEstimateDurationMillis();
|
||||
int innerIntervalIndex = 0;
|
||||
|
|
Loading…
Reference in New Issue