From cc52467c42055caa0aaf9a15f9b7ceb7bf2743db Mon Sep 17 00:00:00 2001 From: Jose Date: Mon, 27 Apr 2020 16:17:12 +0000 Subject: [PATCH] MCOL-3839 Count as window function with constants fix --- utils/windowfunction/wf_count.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/windowfunction/wf_count.cpp b/utils/windowfunction/wf_count.cpp index 1c5ba1c57..8bcded90c 100644 --- a/utils/windowfunction/wf_count.cpp +++ b/utils/windowfunction/wf_count.cpp @@ -120,11 +120,12 @@ void WF_count::operator()(int64_t b, int64_t e, int64_t c) if (cc) { bool isNull = false; - int val = cc->getIntVal(fRow, isNull); + cc->getIntVal(fRow, isNull); if (!isNull) { - fCount = val; + // constant, set fCount to row count + fCount = e - b + 1; } } }