From 30ac0335c908e34bb6ee110f95643f8e9bb61b49 Mon Sep 17 00:00:00 2001 From: Huaxin Gao Date: Sat, 20 Apr 2024 19:26:30 -0700 Subject: [PATCH] fix fmt --- core/src/execution/datafusion/expressions/variance.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/execution/datafusion/expressions/variance.rs b/core/src/execution/datafusion/expressions/variance.rs index 46ea9dced..c653adfaa 100644 --- a/core/src/execution/datafusion/expressions/variance.rs +++ b/core/src/execution/datafusion/expressions/variance.rs @@ -235,8 +235,8 @@ impl Accumulator for VarianceAccumulator { }; Ok(ScalarValue::Float64(match self.count { - 0.0 => None, - 1.0 => { + count if count == 0.0 => None, + count if count == 1.0 => { if let StatsType::Population = self.stats_type { Some(0.0) } else if self.null_on_divide_by_zero { @@ -245,7 +245,7 @@ impl Accumulator for VarianceAccumulator { Some(f64::NAN) } } - _ => Some(self.m2 / count), + _ => Some(self.m2 / self.count), })) }