You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-523 Add back in initial reset for UDAF calls without GROUP BY
This commit is contained in:
@ -680,6 +680,7 @@ ReturnedColumn* buildWindowFunctionColumn(Item* item, gp_walk_info& gwi, bool& n
|
|||||||
break;
|
break;
|
||||||
case Item_sum::UDF_SUM_FUNC:
|
case Item_sum::UDF_SUM_FUNC:
|
||||||
{
|
{
|
||||||
|
// UDAnF functions each have their own default set in context.
|
||||||
mcsv1sdk::mcsv1Context& context = ac->getUDAFContext();
|
mcsv1sdk::mcsv1Context& context = ac->getUDAFContext();
|
||||||
if (context.getRunFlag(UDAF_WINDOWFRAME_REQUIRED))
|
if (context.getRunFlag(UDAF_WINDOWFRAME_REQUIRED))
|
||||||
{
|
{
|
||||||
|
@ -792,6 +792,14 @@ void RowAggregation::initialize()
|
|||||||
{
|
{
|
||||||
fRowGroupOut->setRowCount(1);
|
fRowGroupOut->setRowCount(1);
|
||||||
attachGroupConcatAg();
|
attachGroupConcatAg();
|
||||||
|
// For UDAF, reset the data
|
||||||
|
for (uint64_t i = 0; i < fFunctionCols.size(); i++)
|
||||||
|
{
|
||||||
|
if (fFunctionCols[i]->fAggFunction == ROWAGG_UDAF)
|
||||||
|
{
|
||||||
|
resetUDAF(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user