Skip to content

Commit

Permalink
expression: generate big real numbers when testing (#13338)
Browse files Browse the repository at this point in the history
  • Loading branch information
qw4990 authored and sre-bot committed Nov 11, 2019
1 parent 2b5f81a commit 6f50566
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions expression/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ func (g *defaultGener) gen() interface{} {
return rand.Int63()
case types.ETReal:
if rand.Float64() < 0.5 {
return -rand.Float64()
return -rand.Float64() * 1000000
}
return rand.Float64()
return rand.Float64() * 1000000
case types.ETDecimal:
d := new(types.MyDecimal)
var f float64
Expand Down
2 changes: 1 addition & 1 deletion expression/builtin_math_vec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var vecBuiltinMathCases = map[string][]vecExprBenchCase{
{retEvalType: types.ETReal, childrenTypes: []types.EvalType{types.ETReal}},
},
ast.Exp: {
{retEvalType: types.ETReal, childrenTypes: []types.EvalType{types.ETReal}},
{retEvalType: types.ETReal, childrenTypes: []types.EvalType{types.ETReal}, geners: []dataGenerator{&rangeRealGener{-1, 1, 0.2}}},
},
ast.Degrees: {
{retEvalType: types.ETReal, childrenTypes: []types.EvalType{types.ETReal}},
Expand Down

0 comments on commit 6f50566

Please sign in to comment.