Skip to content

Commit

Permalink
expression: implement vectorized evaluation for 'builtinDurationAnyVa…
Browse files Browse the repository at this point in the history
…lueSig' (pingcap#12605)
  • Loading branch information
tsthght authored and XiaTianliang committed Dec 21, 2019
1 parent d2a86a7 commit 7d8a73b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions expression/builtin_miscellaneous_vec.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ func (b *builtinLockSig) vecEvalInt(input *chunk.Chunk, result *chunk.Column) er
}

func (b *builtinDurationAnyValueSig) vectorized() bool {
return false
return true
}

func (b *builtinDurationAnyValueSig) vecEvalDuration(input *chunk.Chunk, result *chunk.Column) error {
return errors.Errorf("not implemented")
return b.args[0].VecEvalDuration(b.ctx, input, result)
}

func (b *builtinIntAnyValueSig) vectorized() bool {
Expand Down
3 changes: 3 additions & 0 deletions expression/builtin_miscellaneous_vec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ var vecBuiltinMiscellaneousCases = map[string][]vecExprBenchCase{
ast.IsIPv4: {
{retEvalType: types.ETInt, childrenTypes: []types.EvalType{types.ETString}},
},
ast.AnyValue: {
{retEvalType: types.ETDuration, childrenTypes: []types.EvalType{types.ETDuration}},
},
ast.NameConst: {
{retEvalType: types.ETDuration, childrenTypes: []types.EvalType{types.ETString, types.ETDuration}},
},
Expand Down

0 comments on commit 7d8a73b

Please sign in to comment.