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

MCOL-523 Add back in initial reset for UDAF calls without GROUP BY

This commit is contained in:
David Hall
2017-08-02 14:57:07 -05:00
parent 211cde5b05
commit b401a9293c
2 changed files with 9 additions and 0 deletions

View File

@ -680,6 +680,7 @@ ReturnedColumn* buildWindowFunctionColumn(Item* item, gp_walk_info& gwi, bool& n
break;
case Item_sum::UDF_SUM_FUNC:
{
// UDAnF functions each have their own default set in context.
mcsv1sdk::mcsv1Context& context = ac->getUDAFContext();
if (context.getRunFlag(UDAF_WINDOWFRAME_REQUIRED))
{

View File

@ -792,6 +792,14 @@ void RowAggregation::initialize()
{
fRowGroupOut->setRowCount(1);
attachGroupConcatAg();
// For UDAF, reset the data
for (uint64_t i = 0; i < fFunctionCols.size(); i++)
{
if (fFunctionCols[i]->fAggFunction == ROWAGG_UDAF)
{
resetUDAF(i);
}
}
}