Skip to content

Commit

Permalink
PCP-5: Improve the performance of WindowExec by using sliding windo…
Browse files Browse the repository at this point in the history
…w or segment tree pingcap#12967

fix EvalReal
  • Loading branch information
mmyj committed Jan 1, 2020
1 parent 9cf1e1e commit 9e14b03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions executor/aggfuncs/func_count.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit 9e14b03

Please sign in to comment.