From 9e14b0359b0a64288ea411ff93b760bd7bc2d47a Mon Sep 17 00:00:00 2001 From: mmyj Date: Wed, 1 Jan 2020 20:01:14 +0800 Subject: [PATCH] PCP-5: Improve the performance of `WindowExec` by using sliding window or segment tree #12967 fix EvalReal --- executor/aggfuncs/func_count.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/executor/aggfuncs/func_count.go b/executor/aggfuncs/func_count.go index ef19156db138f..ff05a212381b7 100644 --- a/executor/aggfuncs/func_count.go +++ b/executor/aggfuncs/func_count.go @@ -108,7 +108,7 @@ func (e *countOriginal4Real) UpdatePartialResult(sctx sessionctx.Context, rowsIn func (e *countOriginal4Real) Slide(sctx sessionctx.Context, rows []chunk.Row, lastStart, lastEnd uint64, shiftStart, shiftEnd uint64, pr PartialResult) error { p := (*partialResult4Count)(pr) for i := uint64(0); i < shiftStart; i++ { - _, isNull, err := e.args[0].EvalInt(sctx, rows[lastStart+i]) + _, isNull, err := e.args[0].EvalReal(sctx, rows[lastStart+i]) if err != nil { return err } @@ -118,7 +118,7 @@ func (e *countOriginal4Real) Slide(sctx sessionctx.Context, rows []chunk.Row, la *p-- } for i := uint64(0); i < shiftEnd; i++ { - _, isNull, err := e.args[0].EvalInt(sctx, rows[lastEnd+i]) + _, isNull, err := e.args[0].EvalReal(sctx, rows[lastEnd+i]) if err != nil { return err }