1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-04 04:42:30 +03:00

Dataconvert::decimalToString badly fails w/o 20th member of mcs_pow_10 so I returned it

WF::percentile runtime threw an exception b/c of wrong DT deduced from its argument

Replaced literals with constants

Tought WF_sum_avg::checkSumLimit to use refs instead of values
This commit is contained in:
Roman Nozdrin
2020-08-27 17:04:29 +00:00
parent af80081c94
commit 1c3a34a3d0
13 changed files with 76 additions and 143 deletions

View File

@ -52,8 +52,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "widedecimalutils.h"
#ifdef _MSC_VER
#define strcasecmp stricmp
#endif
@ -389,7 +387,8 @@ void WindowFunctionColumn::adjustResultType()
if (boost::iequals(fFunctionName, "SUM") ||
boost::iequals(fFunctionName, "AVG") ||
boost::iequals(fFunctionName, "AVG_DISTINCT"))
boost::iequals(fFunctionName, "AVG_DISTINCT") ||
boost::iequals(fFunctionName, "PERCENTILE"))
{
if (fFunctionParms[0]->resultType().colDataType == CalpontSystemCatalog::DECIMAL ||
fFunctionParms[0]->resultType().colDataType == CalpontSystemCatalog::UDECIMAL)
@ -689,7 +688,7 @@ void WindowFunctionColumn::evaluate(Row& row, bool& isNull)
case 16:
{
int128_t dec = row.getInt128Field(fInputIndex);
if (utils::isWideDecimalNullValue(dec))
if (dec == datatypes::Decimal128Null)
isNull = true;
else
{