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

MCOL-3659 Use Long Double as result type for AVG_DISTINCT window function.

This commit is contained in:
Gagan Goel
2019-12-10 07:26:25 +00:00
parent a9717ad49d
commit e88becca30

View File

@ -384,7 +384,8 @@ void WindowFunctionColumn::adjustResultType()
fResultType = fFunctionParms[0]->resultType();
if (boost::iequals(fFunctionName, "SUM") ||
boost::iequals(fFunctionName, "AVG"))
boost::iequals(fFunctionName, "AVG") ||
boost::iequals(fFunctionName, "AVG_DISTINCT"))
{
fResultType.colDataType = CalpontSystemCatalog::LONGDOUBLE;
fResultType.colWidth = sizeof(long double);