Skip to content

Commit

Permalink
expression: implement vectorized evaluation for `builtinNameConstJSON…
Browse files Browse the repository at this point in the history
…Sig` (#13384)
  • Loading branch information
Baytwt authored and qw4990 committed Nov 18, 2019
1 parent 0b41fe9 commit 381e745
Show file tree
Hide file tree
Showing 2 changed files with 3 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 @@ -324,11 +324,11 @@ func (b *builtinNameConstDecimalSig) vecEvalDecimal(input *chunk.Chunk, result *
}

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

func (b *builtinNameConstJSONSig) vecEvalJSON(input *chunk.Chunk, result *chunk.Column) error {
return errors.Errorf("not implemented")
return b.args[1].VecEvalJSON(b.ctx, input, result)
}

func (b *builtinInet6AtonSig) vectorized() bool {
Expand Down
1 change: 1 addition & 0 deletions expression/builtin_miscellaneous_vec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ var vecBuiltinMiscellaneousCases = map[string][]vecExprBenchCase{
{retEvalType: types.ETDecimal, childrenTypes: []types.EvalType{types.ETString, types.ETDecimal}},
{retEvalType: types.ETInt, childrenTypes: []types.EvalType{types.ETString, types.ETInt}},
{retEvalType: types.ETReal, childrenTypes: []types.EvalType{types.ETString, types.ETReal}},
{retEvalType: types.ETJson, childrenTypes: []types.EvalType{types.ETString, types.ETJson}},
{retEvalType: types.ETTimestamp, childrenTypes: []types.EvalType{types.ETString, types.ETTimestamp}},
},
}
Expand Down

0 comments on commit 381e745

Please sign in to comment.