Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
Signed-off-by: Sarthak Aggarwal <[email protected]>
  • Loading branch information
sarthakaggarwal97 committed Aug 26, 2024
1 parent ffda55b commit 1f1e444
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 43 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
* <p>This implementation follows the Kahan summation algorithm to improve the accuracy
* of the sum by tracking and compensating for the accumulated error in each iteration.
*
* @see <a href="http://en.wikipedia.org/wiki/Kahan_summation_algorithm">Kahan Summation Algorithm</a>
*
* @opensearch.experimental
* @see <a href="http://en.wikipedia.org/wiki/Kahan_summation_algorithm">Kahan Summation Algorithm</a>
*/
class SumValueAggregator implements ValueAggregator<Double> {

Expand Down Expand Up @@ -67,11 +66,7 @@ public Double mergeAggregatedValues(Double value, Double aggregatedValue) {
assert aggregatedValue == null || kahanSummation.value() == aggregatedValue;
// add takes care of the sum and compensation internally
if (value != null) {
if (value != null) {
kahanSummation.add(value);
} else {
kahanSummation.add(getIdentityMetricValue());
}
kahanSummation.add(value);
} else {
kahanSummation.add(getIdentityMetricValue());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Iterator<StarTreeDocument> mergeStarTrees(List<StarTreeValues> starTreeValuesSub
* Returns an array of all the starTreeDocuments from all the segments
* We only take the non-star documents from all the segments.
*
* @param starTreeValuesSubs StarTreeValues from multiple segmentsx
* @param starTreeValuesSubs StarTreeValues from multiple segments
* @return array of star tree documents
*/
StarTreeDocument[] getSegmentsStarTreeDocuments(List<StarTreeValues> starTreeValuesSubs) throws IOException {
Expand Down

0 comments on commit 1f1e444

Please sign in to comment.