fix to the name of the injected aggregation for derivatives
This commit is contained in:
parent
d65e9a4a90
commit
ef4a910078
|
@ -96,9 +96,9 @@ public class DerivativeReducer extends Reducer {
|
||||||
double diff = thisBucketValue - lastBucketValue;
|
double diff = thisBucketValue - lastBucketValue;
|
||||||
|
|
||||||
List<InternalAggregation> aggs = new ArrayList<>(Lists.transform(bucket.getAggregations().asList(), FUNCTION));
|
List<InternalAggregation> aggs = new ArrayList<>(Lists.transform(bucket.getAggregations().asList(), FUNCTION));
|
||||||
aggs.add(new InternalSimpleValue(bucketsPath, diff, null, new ArrayList<Reducer>(), metaData())); // NOCOMMIT implement formatter for derivative reducer
|
aggs.add(new InternalSimpleValue(name(), diff, null, new ArrayList<Reducer>(), metaData())); // NOCOMMIT implement formatter for derivative reducer
|
||||||
InternalHistogram.Bucket newBucket = factory.createBucket(((DateTime) bucket.getKey()).getMillis(), bucket.getDocCount(),
|
InternalHistogram.Bucket newBucket = factory.createBucket(((DateTime) bucket.getKey()).getMillis(), bucket.getDocCount(),
|
||||||
new InternalAggregations(aggs), bucket.getKeyed(), bucket.getFormatter()); // NOCOMMIT fix key resolution for dates
|
new InternalAggregations(aggs), bucket.getKeyed(), bucket.getFormatter()); // NOCOMMIT fix key resolution to deal with numbers and dates
|
||||||
newBuckets.add(newBucket);
|
newBuckets.add(newBucket);
|
||||||
} else {
|
} else {
|
||||||
newBuckets.add(bucket);
|
newBuckets.add(bucket);
|
||||||
|
|
Loading…
Reference in New Issue