We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6edcb6d commit 38f727aCopy full SHA for 38f727a
datafusion/common/src/stats.rs
@@ -265,7 +265,10 @@ impl Precision<ScalarValue> {
265
/// SUM-style addition with integer widening to match SQL `SUM` return
266
/// types for smaller integral inputs.
267
pub fn add_for_sum(&self, other: &Precision<ScalarValue>) -> Precision<ScalarValue> {
268
- precision_add(&self.cast_to_sum_type(), &other.cast_to_sum_type())
+ let mut lhs = self.cast_to_sum_type();
269
+ let rhs = other.cast_to_sum_type();
270
+ precision_add(&mut lhs, &rhs);
271
+ lhs
272
}
273
274
/// Calculates the difference of two (possibly inexact) [`ScalarValue`] values,
0 commit comments