question: private @ NotNull Aggregation createSummingAggregator ( MetricField innerMetric ) { String outerSummingFieldName ; if ( ! innerMetric . isSketch ( ) && innerMetric instanceof Aggregation ) { outerSummingFieldName = innerMetric . getName ( ) ; } else { outerSummingFieldName = innerMetric . getName ( ) + "_sum" ; } if ( innerMetric . isFloatingPoint ( ) ) { return new DoubleSumAggregation ( outerSummingFieldName , innerMetric . getName ( ) ) ; } return new LongSumAggregation ( outerSummingFieldName , innerMetric . getName ( ) ) ; }
target:  Create an Aggregation for summing on a metric from an inner query.