Skip to content

Commit c3f2fab

Browse files
committed
[ga-format-pr] Run ./format_repo.sh to fix formatting
1 parent a4e8d45 commit c3f2fab

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

sql/expression/function/aggregation/unary_agg_buffers.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -682,11 +682,11 @@ func evalFloat64(ctx *sql.Context, row sql.Row, expr sql.Expression) (any, error
682682
}
683683

684684
func calcOnlineMean(oldMean float64, val float64, count uint64) float64 {
685-
return oldMean + (val - oldMean) / float64(count)
685+
return oldMean + (val-oldMean)/float64(count)
686686
}
687687

688688
func calcOnlineVar2(oldMean, newMean, oldVar2, val float64) float64 {
689-
return oldVar2 + (val - oldMean) * (val - newMean)
689+
return oldVar2 + (val-oldMean)*(val-newMean)
690690
}
691691

692692
type stdDevPopBuffer struct {
@@ -796,8 +796,8 @@ type varPopBuffer struct {
796796
expr sql.Expression
797797

798798
count uint64
799-
mean float64
800-
std2 float64
799+
mean float64
800+
std2 float64
801801
}
802802

803803
func NewVarPopBuffer(child sql.Expression) *varPopBuffer {

sql/expression/function/aggregation/window_functions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,7 +1582,7 @@ func (s *StdDevSampAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, b
15821582
return err
15831583
}
15841584

1585-
return math.Sqrt(s2 / float64(nonNullCnt - 1))
1585+
return math.Sqrt(s2 / float64(nonNullCnt-1))
15861586
}
15871587

15881588
type VarPopAgg struct {
@@ -1659,4 +1659,4 @@ func (v *VarPopAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf s
16591659
}
16601660

16611661
return s2 / float64(nonNullCnt)
1662-
}
1662+
}

0 commit comments

Comments
 (0)