Skip to content

Commit 8307a39

Browse files
committed
update pingcap#3
1 parent ee281e6 commit 8307a39

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

expression/builtin_compare_vec.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -480,26 +480,22 @@ func (b *builtinNullEQDecimalSig) vectorized() bool {
480480

481481
func (b *builtinNullEQDecimalSig) vecEvalInt(input *chunk.Chunk, result *chunk.Column) error {
482482
n := input.NumRows()
483-
484483
buf0, err := b.bufAllocator.get(types.ETDecimal, n)
485484
if err != nil {
486485
return err
487486
}
487+
defer b.bufAllocator.put(buf0)
488488
if err := b.args[0].VecEvalDecimal(b.ctx, input, buf0); err != nil {
489489
return err
490490
}
491-
defer b.bufAllocator.put(buf0)
492-
493491
buf1, err := b.bufAllocator.get(types.ETDecimal, n)
494492
if err != nil {
495493
return err
496494
}
497-
495+
defer b.bufAllocator.put(buf1)
498496
if err := b.args[1].VecEvalDecimal(b.ctx, input, buf1); err != nil {
499497
return err
500498
}
501-
defer b.bufAllocator.put(buf1)
502-
503499
args0 := buf0.Decimals()
504500
args1 := buf1.Decimals()
505501
result.ResizeInt64(n, false)

0 commit comments

Comments
 (0)