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

MCOL-1793 Window functions return garbage if current row outside of window frame.

This commit is contained in:
David Hall
2018-11-06 10:11:45 -06:00
parent 826fdc82d5
commit d01fe36fdc
3 changed files with 14 additions and 5 deletions

View File

@ -481,6 +481,7 @@ bool WF_udaf::dropValues(int64_t b, int64_t e)
}
}
WindowFunctionType::resetData();
return true;
}
@ -708,6 +709,12 @@ void WF_udaf::operator()(int64_t b, int64_t e, int64_t c)
uint64_t colOut = fFieldIndex[0];
bool isNull = false;
// Initialize result to NULL. If no values are found, NULL is the result.
// if (getContext().getRunFlag(mcsv1sdk::UDAF_DEFAULT_NULL))
// {
// getNullValueAny(fValOut, getContext().getResultType(), getContext().getColWidth());
// }
if ((fFrameUnit == WF__FRAME_ROWS) ||
(fPrev == -1) ||
(!fPeer->operator()(getPointer(fRowData->at(c)), getPointer(fRowData->at(fPrev)))))