Skip to content

Commit d865d06

Browse files
committed
Fix test
1 parent 9a77434 commit d865d06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/histogram/ExtractHistogramComponentTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private static Object getExpectedValue(TestCaseSupplier.TypedData histogram, Exp
9191
double max = value.max();
9292
yield Double.isNaN(max) ? null : max;
9393
}
94-
case SUM -> value.sum();
94+
case SUM -> value.valueCount() > 0 ? value.sum() : null;
9595
case COUNT -> value.valueCount();
9696
};
9797
}

0 commit comments

Comments
 (0)