This commit is contained in:
parent
8841779de8
commit
7114fe786b
|
@ -526,6 +526,9 @@ public final class InternalAutoDateHistogram extends
|
|||
if (buckets.size() > targetBuckets) {
|
||||
for (int interval : roundingInfo.innerIntervals) {
|
||||
int resultingBuckets = buckets.size() / interval;
|
||||
if (buckets.size() % interval != 0) {
|
||||
resultingBuckets++;
|
||||
}
|
||||
if (resultingBuckets <= targetBuckets) {
|
||||
return mergeConsecutiveBuckets(buckets, interval, roundingIdx, roundingInfo, reduceContext);
|
||||
}
|
||||
|
|
|
@ -108,10 +108,7 @@ public class InternalAutoDateHistogramTests extends InternalMultiBucketAggregati
|
|||
assertThat(result, equalTo(2));
|
||||
}
|
||||
|
||||
|
||||
@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() {
|
||||
super.testReduceRandom();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue