1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

MCOL-869 UDAF with other aggregate gives wrong answer

This commit is contained in:
David Hall
2017-08-11 12:46:19 -05:00
parent 58e8a8480e
commit 4eafaa8682
7 changed files with 98 additions and 25 deletions

View File

@@ -2863,7 +2863,7 @@ void RowAggregationUM::doNullConstantAggregate(const ConstantAggData& aggData, u
int64_t rowCnt = 0;
// For a NULL constant, call nextValue with NULL and then evaluate.
bool bInterrupted = false;
mcsv1sdk::mcsv1Context context;
mcsv1sdk::mcsv1Context context(((RowUDAFFunctionCol*)fFunctionCols[i].get())->fUDAFContext);
context.setRowCnt(rowCnt);
context.setInterrupted(bInterrupted);
context.createUserData();
@@ -3193,10 +3193,9 @@ void RowAggregationUM::doNotNullConstantAggregate(const ConstantAggData& aggData
{
int64_t rowCnt = 0;
bool bInterrupted = false;
mcsv1sdk::mcsv1Context context;
mcsv1sdk::mcsv1Context context(((RowUDAFFunctionCol*)fFunctionCols[i].get())->fUDAFContext);
context.setRowCnt(rowCnt);
context.setInterrupted(bInterrupted);
// Try the complex data initiation. If not implemented, use the simple,
context.createUserData();
mcsv1sdk::mcsv1_UDAF::ReturnCode rc;
std::vector<mcsv1sdk::ColumnDatum> valsIn;