You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-3839 Count as window function doesn't work with NULLs'
This commit is contained in:
@ -110,7 +110,7 @@ void WF_count<T>::operator()(int64_t b, int64_t e, int64_t c)
|
|||||||
e = c;
|
e = c;
|
||||||
|
|
||||||
// for count(*), the column is optimized out, index[1] does not exist.
|
// for count(*), the column is optimized out, index[1] does not exist.
|
||||||
uint64_t colIn = (fFunctionId == WF__COUNT_ASTERISK) ? 0 : fFieldIndex[1];
|
int64_t colIn = (fFunctionId == WF__COUNT_ASTERISK) ? 0 : fFieldIndex[1];
|
||||||
|
|
||||||
for (int64_t i = b; i <= e; i++)
|
for (int64_t i = b; i <= e; i++)
|
||||||
{
|
{
|
||||||
@ -125,7 +125,7 @@ void WF_count<T>::operator()(int64_t b, int64_t e, int64_t c)
|
|||||||
|
|
||||||
fRow.setData(getPointer(fRowData->at(i)));
|
fRow.setData(getPointer(fRowData->at(i)));
|
||||||
|
|
||||||
if (fRow.isNullValue(colIn) == true)
|
if (colIn == -1 || fRow.isNullValue(colIn) == true)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (fFunctionId != WF__COUNT_DISTINCT)
|
if (fFunctionId != WF__COUNT_DISTINCT)
|
||||||
|
Reference in New Issue
Block a user