1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-1822 finishing up use long double for SUM/AVG

This commit is contained in:
David Hall
2019-03-01 17:34:57 -06:00
parent cf056e42ac
commit 9e1cec56b1
5 changed files with 67 additions and 42 deletions

View File

@ -378,6 +378,14 @@ void WindowFunctionColumn::adjustResultType()
boost::iequals(fFunctionName, "NTH_VALUE")) &&
!fFunctionParms.empty())
fResultType = fFunctionParms[0]->resultType();
if (boost::iequals(fFunctionName, "SUM") ||
boost::iequals(fFunctionName, "AVG"))
{
fResultType.colDataType = CalpontSystemCatalog::LONGDOUBLE;
fResultType.colWidth = sizeof(long double);
fResultType.precision = -1;
}
}
void WindowFunctionColumn::evaluate(Row& row, bool& isNull)