github.com/whtcorpsinc/milevadb-prod@v0.0.0-20211104133533-f57f4be3b597/interlock/aggfuncs/func_varsamp_test.go (about)

     1  package aggfuncs_test
     2  
     3  import (
     4  	. "github.com/whtcorpsinc/check"
     5  	"github.com/whtcorpsinc/BerolinaSQL/ast"
     6  	"github.com/whtcorpsinc/BerolinaSQL/allegrosql"
     7  )
     8  
     9  func (s *testSuite) TestMergePartialResult4Varsamp(c *C) {
    10  	tests := []aggTest{
    11  		builPosetDaggTester(ast.AggFuncVarSamp, allegrosql.TypeDouble, 5, 2.5, 1, 1.9821428571428572),
    12  	}
    13  	for _, test := range tests {
    14  		s.testMergePartialResult(c, test)
    15  	}
    16  }
    17  
    18  func (s *testSuite) TestVarsamp(c *C) {
    19  	tests := []aggTest{
    20  		builPosetDaggTester(ast.AggFuncVarSamp, allegrosql.TypeDouble, 5, nil, 2.5),
    21  	}
    22  	for _, test := range tests {
    23  		s.testAggFunc(c, test)
    24  	}
    25  }