Co-authored-by: Zhuomin(Charming) Liu <lzmhhh123@gmail.com> Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
26 lines
568 B
Go
26 lines
568 B
Go
package aggfuncs_test
|
|
|
|
import (
|
|
. "github.com/pingcap/check"
|
|
"github.com/pingcap/parser/ast"
|
|
"github.com/pingcap/parser/mysql"
|
|
)
|
|
|
|
func (s *testSuite) TestMergePartialResult4Varsamp(c *C) {
|
|
tests := []aggTest{
|
|
buildAggTester(ast.AggFuncVarSamp, mysql.TypeDouble, 5, 2.5, 1, 1.9821428571428572),
|
|
}
|
|
for _, test := range tests {
|
|
s.testMergePartialResult(c, test)
|
|
}
|
|
}
|
|
|
|
func (s *testSuite) TestVarsamp(c *C) {
|
|
tests := []aggTest{
|
|
buildAggTester(ast.AggFuncVarSamp, mysql.TypeDouble, 5, nil, 2.5),
|
|
}
|
|
for _, test := range tests {
|
|
s.testAggFunc(c, test)
|
|
}
|
|
}
|