Skip to content

Commit

Permalink
expression: implement vectorized evaluation for builtinRoundIntSig (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tangwz authored and sre-bot committed Sep 23, 2019
1 parent d1378f9 commit 61f26d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions expression/builtin_math_vec.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,3 +453,11 @@ func (b *builtinAbsIntSig) vecEvalInt(input *chunk.Chunk, result *chunk.Column)
func (b *builtinAbsIntSig) vectorized() bool {
return true
}

func (b *builtinRoundIntSig) vecEvalInt(input *chunk.Chunk, result *chunk.Column) error {
return b.args[0].VecEvalInt(b.ctx, input, result)
}

func (b *builtinRoundIntSig) vectorized() bool {
return true
}
1 change: 1 addition & 0 deletions expression/builtin_math_vec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ var vecBuiltinMathCases = map[string][]vecExprBenchCase{
},
ast.Round: {
{types.ETDecimal, []types.EvalType{types.ETDecimal}, nil},
{types.ETInt, []types.EvalType{types.ETInt}, nil},
},
ast.Pow: {
{types.ETReal, []types.EvalType{types.ETReal, types.ETReal}, []dataGenerator{&rangeRealGener{0, 10, 0.5}, &rangeRealGener{0, 100, 0.5}}},
Expand Down

0 comments on commit 61f26d8

Please sign in to comment.