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-4171 Window functions with decimal(38)
This commit is contained in:
committed by
Roman Nozdrin
parent
62c1c1e0e2
commit
c4d8516a47
@ -361,7 +361,9 @@ bool WindowFunctionColumn::hasWindowFunc()
|
||||
|
||||
void WindowFunctionColumn::adjustResultType()
|
||||
{
|
||||
if (fResultType.colDataType == CalpontSystemCatalog::DECIMAL &&
|
||||
if ((fResultType.colDataType == CalpontSystemCatalog::DECIMAL ||
|
||||
fResultType.colDataType == CalpontSystemCatalog::UDECIMAL)
|
||||
&&
|
||||
!boost::iequals(fFunctionName, "COUNT") &&
|
||||
!boost::iequals(fFunctionName, "COUNT(*)") &&
|
||||
!boost::iequals(fFunctionName, "ROW_NUMBER") &&
|
||||
@ -389,7 +391,8 @@ void WindowFunctionColumn::adjustResultType()
|
||||
boost::iequals(fFunctionName, "AVG") ||
|
||||
boost::iequals(fFunctionName, "AVG_DISTINCT"))
|
||||
{
|
||||
if (fFunctionParms[0]->resultType().colDataType == CalpontSystemCatalog::DECIMAL)
|
||||
if (fFunctionParms[0]->resultType().colDataType == CalpontSystemCatalog::DECIMAL ||
|
||||
fFunctionParms[0]->resultType().colDataType == CalpontSystemCatalog::UDECIMAL)
|
||||
{
|
||||
fResultType.colWidth = sizeof(int128_t);
|
||||
}
|
||||
|
Reference in New Issue
Block a user