Skip to content

Commit

Permalink
expression: implement vectorized evaluation for builtin field(Real/In…
Browse files Browse the repository at this point in the history
…t/String) (pingcap#13171)
  • Loading branch information
b41sh authored and XiaTianliang committed Dec 21, 2019
1 parent 491f146 commit f84af94
Show file tree
Hide file tree
Showing 6 changed files with 425 additions and 25 deletions.
1 change: 1 addition & 0 deletions expression/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//go:generate go run generator/compare_vec.go
//go:generate go run generator/control_vec.go
//go:generate go run generator/other_vec.go
//go:generate go run generator/string_vec.go
//go:generate go run generator/time_vec.go

package expression
Expand Down
24 changes: 0 additions & 24 deletions expression/builtin_string_vec.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,14 +494,6 @@ func (b *builtinLTrimSig) vecEvalString(input *chunk.Chunk, result *chunk.Column
return nil
}

func (b *builtinFieldStringSig) vectorized() bool {
return false
}

func (b *builtinFieldStringSig) vecEvalInt(input *chunk.Chunk, result *chunk.Column) error {
return errors.Errorf("not implemented")
}

func (b *builtinQuoteSig) vectorized() bool {
return true
}
Expand Down Expand Up @@ -1078,14 +1070,6 @@ func (b *builtinInstrSig) vecEvalInt(input *chunk.Chunk, result *chunk.Column) e
return errors.Errorf("not implemented")
}

func (b *builtinFieldRealSig) vectorized() bool {
return false
}

func (b *builtinFieldRealSig) vecEvalInt(input *chunk.Chunk, result *chunk.Column) error {
return errors.Errorf("not implemented")
}

func (b *builtinOctStringSig) vectorized() bool {
return true
}
Expand Down Expand Up @@ -1955,14 +1939,6 @@ func (b *builtinHexIntArgSig) vecEvalString(input *chunk.Chunk, result *chunk.Co
return nil
}

func (b *builtinFieldIntSig) vectorized() bool {
return false
}

func (b *builtinFieldIntSig) vecEvalInt(input *chunk.Chunk, result *chunk.Column) error {
return errors.Errorf("not implemented")
}

func (b *builtinFromBase64Sig) vectorized() bool {
return true
}
Expand Down
167 changes: 167 additions & 0 deletions expression/builtin_string_vec_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions expression/builtin_string_vec_generated_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion expression/builtin_string_vec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ var vecBuiltinStringCases = map[string][]vecExprBenchCase{
{retEvalType: types.ETInt, childrenTypes: []types.EvalType{types.ETString}},
},
ast.FindInSet: {},
ast.Field: {},
ast.MakeSet: {
{retEvalType: types.ETString, childrenTypes: []types.EvalType{types.ETInt, types.ETString, types.ETString, types.ETString, types.ETString, types.ETString, types.ETString, types.ETString, types.ETString}},
},
Expand Down
Loading

0 comments on commit f84af94

Please sign in to comment.