This commit is contained in:
parent
8841779de8
commit
7114fe786b
|
@ -526,6 +526,9 @@ public final class InternalAutoDateHistogram extends
|
||||||
if (buckets.size() > targetBuckets) {
|
if (buckets.size() > targetBuckets) {
|
||||||
for (int interval : roundingInfo.innerIntervals) {
|
for (int interval : roundingInfo.innerIntervals) {
|
||||||
int resultingBuckets = buckets.size() / interval;
|
int resultingBuckets = buckets.size() / interval;
|
||||||
|
if (buckets.size() % interval != 0) {
|
||||||
|
resultingBuckets++;
|
||||||
|
}
|
||||||
if (resultingBuckets <= targetBuckets) {
|
if (resultingBuckets <= targetBuckets) {
|
||||||
return mergeConsecutiveBuckets(buckets, interval, roundingIdx, roundingInfo, reduceContext);
|
return mergeConsecutiveBuckets(buckets, interval, roundingIdx, roundingInfo, reduceContext);
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,9 +109,6 @@ public class InternalAutoDateHistogramTests extends InternalMultiBucketAggregati
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/39497")
|
|
||||||
// TODO: When resolving the above AwaitsFix, just delete this override. Method is only overriden to apply the annotation.
|
|
||||||
public void testReduceRandom() {
|
public void testReduceRandom() {
|
||||||
super.testReduceRandom();
|
super.testReduceRandom();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue