From 671470cd88daaf363f5df916445ddc0089e0d766 Mon Sep 17 00:00:00 2001 From: __hidehalo Date: Tue, 22 Dec 2020 17:11:36 +0800 Subject: [PATCH] Revert "expression: fix builtinAddDateStringIntSig#vecEvalTime" This reverts commit 43b1b40df666eded50dcf23bf5c1992e9f824695. --- expression/builtin_time_vec_generated.go | 40 ++---------------------- 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/expression/builtin_time_vec_generated.go b/expression/builtin_time_vec_generated.go index f9f5292597818..e3cb499de5e6b 100644 --- a/expression/builtin_time_vec_generated.go +++ b/expression/builtin_time_vec_generated.go @@ -1681,44 +1681,8 @@ func (b *builtinAddDateStringStringSig) vectorized() bool { } func (b *builtinAddDateStringIntSig) vecEvalTime(input *chunk.Chunk, result *chunk.Column) error { - n := input.NumRows() - unit, isNull, err := b.args[2].EvalString(b.ctx, chunk.Row{}) - if err != nil { - return err - } - if isNull { - result.ResizeTime(n, true) - return nil - } - - intervalBuf, err := b.bufAllocator.get(types.ETString, n) - if err != nil { - return err - } - defer b.bufAllocator.put(intervalBuf) - if err := b.vecGetIntervalFromInt(&b.baseBuiltinFunc, input, unit, intervalBuf); err != nil { - return err - } - - if err := b.vecGetDateFromString(&b.baseBuiltinFunc, input, unit, result); err != nil { - return err - } - - result.MergeNulls(intervalBuf) - resDates := result.Times() - for i := 0; i < n; i++ { - if result.IsNull(i) { - continue - } - resDate, isNull, err := b.add(b.ctx, resDates[i], intervalBuf.GetString(i), unit) - if err != nil { - return err - } - if isNull { - result.SetNull(i, true) - } else { - resDates[i] = resDate - } + for i := 0; i < input.NumRows(); i++ { + result.AppendNull() } return nil }