diff --git a/utils/windowfunction/wf_udaf.cpp b/utils/windowfunction/wf_udaf.cpp index 2876fbf7e..ee48360f1 100644 --- a/utils/windowfunction/wf_udaf.cpp +++ b/utils/windowfunction/wf_udaf.cpp @@ -503,6 +503,7 @@ void WF_udaf::operator()(int64_t b, int64_t e, int64_t c) // NULL flags uint32_t flags[getContext().getParameterCount()]; + bHasNull = false; for (uint32_t k = 0; k < getContext().getParameterCount(); ++k) { cc = static_cast(fConstantParms[k].get()); @@ -715,11 +716,11 @@ void WF_udaf::operator()(int64_t b, int64_t e, int64_t c) } } } - // Skip if any value is NULL and respect nulls is off. - if (bHasNull) - { - continue; - } + } + // Skip if any value is NULL and respect nulls is off. + if (bHasNull) + { + continue; } getContext().setDataFlags(flags);