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-4643 dev 5 reset valOut after processing UDAF
After a UDAF result has been inserted in the output stream, the valOut object needs to be reset to empty in preparation for the next value. Failing to do so may cause what should be a NULL value to erroneously take the last value inserted.
This commit is contained in:
@ -3029,6 +3029,8 @@ void RowAggregationUM::SetUDAFValue(static_any::any& valOut, int64_t colOut)
|
||||
// This handles the mismatch
|
||||
SetUDAFAnyValue(valOut, colOut);
|
||||
}
|
||||
// reset valOut to be ready for the next value
|
||||
valOut.reset();
|
||||
}
|
||||
|
||||
void RowAggregationUM::SetUDAFAnyValue(static_any::any& valOut, int64_t colOut)
|
||||
@ -3298,7 +3300,6 @@ void RowAggregationUM::calculateUDAFColumns()
|
||||
|
||||
// Set the returned value into the output row
|
||||
SetUDAFValue(valOut, colOut);
|
||||
valOut.reset();
|
||||
}
|
||||
|
||||
fRGContext.setUserData(NULL);
|
||||
|
Reference in New Issue
Block a user