Skip to content

Commit

Permalink
expression: implement vectorized evaluation for 'builtinCastJSONAsJSO…
Browse files Browse the repository at this point in the history
…NSig' (pingcap#12794)
  • Loading branch information
tsthght authored and XiaTianliang committed Dec 21, 2019
1 parent 029faf0 commit a4ce627
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions expression/builtin_cast_vec.go
Original file line number Diff line number Diff line change
Expand Up @@ -582,11 +582,11 @@ func (b *builtinCastIntAsJSONSig) vecEvalJSON(input *chunk.Chunk, result *chunk.
}

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

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

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

Expand Down

0 comments on commit a4ce627

Please sign in to comment.