Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Huaxin Gao committed Apr 21, 2024
1 parent 4e2f6fb commit 30ac033
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/execution/datafusion/expressions/variance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -245,7 +245,7 @@ impl Accumulator for VarianceAccumulator {
Some(f64::NAN)
}
}
_ => Some(self.m2 / count),
_ => Some(self.m2 / self.count),
}))
}

Expand Down

0 comments on commit 30ac033

Please sign in to comment.