* add stddev_pop function * fix for make check * not push down * add util test * stddevpop inherit from varpop * fix typo * support std and stddev * update go.mod * uodate parser master * fix ditto * fix fix Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
26 lines
622 B
Go
26 lines
622 B
Go
package aggfuncs_test
|
|
|
|
import (
|
|
. "github.com/pingcap/check"
|
|
"github.com/pingcap/parser/ast"
|
|
"github.com/pingcap/parser/mysql"
|
|
)
|
|
|
|
func (s *testSuite) TestMergePartialResult4Stddevpop(c *C) {
|
|
tests := []aggTest{
|
|
buildAggTester(ast.AggFuncStddevPop, mysql.TypeDouble, 5, 1.4142135623730951, 0.816496580927726, 1.3169567191065923),
|
|
}
|
|
for _, test := range tests {
|
|
s.testMergePartialResult(c, test)
|
|
}
|
|
}
|
|
|
|
func (s *testSuite) TestStddevpop(c *C) {
|
|
tests := []aggTest{
|
|
buildAggTester(ast.AggFuncStddevPop, mysql.TypeDouble, 5, nil, 1.4142135623730951),
|
|
}
|
|
for _, test := range tests {
|
|
s.testAggFunc(c, test)
|
|
}
|
|
}
|