Skip to content

Commit

Permalink
style : run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ChobobDev committed Nov 5, 2022
1 parent c31379a commit 111b583
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/src/data/value/binary_op/integer/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
mod i128;
mod i16;
mod i8;
mod i32;
mod i64;
mod i128;
mod i8;
mod u16;
mod u8;

Expand Down
8 changes: 5 additions & 3 deletions core/src/executor/aggregate/state.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use {
crate::{
ast::{Aggregate, CountArgExpr,DataType},
ast::{Aggregate, CountArgExpr, DataType},
data::{Key, Value},
executor::{context::BlendContext, context::FilterContext, evaluate::evaluate},
result::Result,
Expand Down Expand Up @@ -123,7 +123,7 @@ impl AggrValue {

fn export(self) -> Result<Value> {
let variance = |sum_square: Value, sum: Value, count: i64| {
let count=Value::I64(count as i64);
let count = Value::I64(count as i64);
let sum_expr1 = sum_square.multiply(&count)?;
let sum_expr2 = sum.multiply(&sum)?;
let expr_sub = sum_expr1.cast(&DataType::Float)?.subtract(&sum_expr2)?;
Expand All @@ -134,7 +134,9 @@ impl AggrValue {
match self {
Self::Count { count, .. } => Ok(Value::I64(count)),
Self::Sum(value) | Self::Min(value) | Self::Max(value) => Ok(value),
Self::Avg { sum, count } => (sum.cast(&DataType::Float)?).divide(&Value::I64(count as i64)),
Self::Avg { sum, count } => {
(sum.cast(&DataType::Float)?).divide(&Value::I64(count as i64))
}
Self::Variance {
sum_square,
sum,
Expand Down

0 comments on commit 111b583

Please sign in to comment.