1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-1201 Handle NULLs in Window functions correctly.

This commit is contained in:
David Hall
2018-06-06 16:51:47 -05:00
parent 5b3db71c8f
commit 2b77f0f284

View File

@ -503,6 +503,7 @@ void WF_udaf<T>::operator()(int64_t b, int64_t e, int64_t c)
// NULL flags // NULL flags
uint32_t flags[getContext().getParameterCount()]; uint32_t flags[getContext().getParameterCount()];
bHasNull = false;
for (uint32_t k = 0; k < getContext().getParameterCount(); ++k) for (uint32_t k = 0; k < getContext().getParameterCount(); ++k)
{ {
cc = static_cast<ConstantColumn*>(fConstantParms[k].get()); cc = static_cast<ConstantColumn*>(fConstantParms[k].get());
@ -715,11 +716,11 @@ void WF_udaf<T>::operator()(int64_t b, int64_t e, int64_t c)
} }
} }
} }
// Skip if any value is NULL and respect nulls is off. }
if (bHasNull) // Skip if any value is NULL and respect nulls is off.
{ if (bHasNull)
continue; {
} continue;
} }
getContext().setDataFlags(flags); getContext().setDataFlags(flags);