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

MCOL-4452 RowAggregationUMP2::doUDAF() now calls setUserData() using a correct UDAF context

This commit is contained in:
Roman Nozdrin
2020-12-22 15:43:51 +00:00
parent ba4190d200
commit 5815c5c526

View File

@ -4627,13 +4627,14 @@ void RowAggregationUMP2::doUDAF(const Row& rowIn,
// Call the UDAF subEvaluate method
mcsv1sdk::mcsv1_UDAF::ReturnCode rc;
rc = udafContextsColl[funcColsIdx].getFunction()->subEvaluate(&udafContextsColl[funcColsIdx], userDataIn.get());
fRGContext.setUserData(NULL);
udafContextsColl[funcColsIdx].setUserData(NULL);
if (rc == mcsv1sdk::mcsv1_UDAF::ERROR)
{
RowUDAFFunctionCol* rowUDAF = dynamic_cast<RowUDAFFunctionCol*>(fFunctionCols[funcColsIdx].get());
rowUDAF->bInterrupted = true;
throw logging::IDBExcept(fRGContext.getErrorMessage(), logging::aggregateFuncErr);
throw logging::IDBExcept(udafContextsColl[funcColsIdx].getErrorMessage(),
logging::aggregateFuncErr);
}
}