expression: implement vectorized evaluation for builtinBitNegSig (#13554)
This commit is contained in:
@ -190,11 +190,19 @@ func (b *builtinUnaryMinusRealSig) vecEvalReal(input *chunk.Chunk, result *chunk
|
||||
}
|
||||
|
||||
func (b *builtinBitNegSig) vectorized() bool {
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
func (b *builtinBitNegSig) vecEvalInt(input *chunk.Chunk, result *chunk.Column) error {
|
||||
return errors.Errorf("not implemented")
|
||||
if err := b.args[0].VecEvalInt(b.ctx, input, result); err != nil {
|
||||
return err
|
||||
}
|
||||
n := input.NumRows()
|
||||
args := result.Int64s()
|
||||
for i := 0; i < n; i++ {
|
||||
args[i] = ^args[i]
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *builtinUnaryMinusDecimalSig) vectorized() bool {
|
||||
|
||||
@ -47,6 +47,9 @@ var vecBuiltinOpCases = map[string][]vecExprBenchCase{
|
||||
ast.Or: {
|
||||
{retEvalType: types.ETInt, childrenTypes: []types.EvalType{types.ETInt, types.ETInt}, geners: makeBinaryLogicOpDataGeners()},
|
||||
},
|
||||
ast.BitNeg: {
|
||||
{retEvalType: types.ETInt, childrenTypes: []types.EvalType{types.ETInt}},
|
||||
},
|
||||
ast.UnaryNot: {
|
||||
{retEvalType: types.ETInt, childrenTypes: []types.EvalType{types.ETReal}},
|
||||
{retEvalType: types.ETInt, childrenTypes: []types.EvalType{types.ETDecimal}},
|
||||
|
||||
Reference in New Issue
Block a user