Skip to content

Commit 9923ece

Browse files
author
James Cor
committed
merge
2 parents e83585a + c3f2fab commit 9923ece

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
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: 1 addition & 1 deletion
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 {

0 commit comments

Comments
 (0)