1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-02 17:22:27 +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

@ -46,6 +46,8 @@ using namespace ordering;
#include "constantcolumn.h"
using namespace execplan;
#include "mcs_decimal.h"
#include "windowfunctionstep.h"
using namespace joblist;
@ -89,31 +91,19 @@ boost::shared_ptr<WindowFunctionType> WF_percentile<T>::makeFunction(int id, con
}
case CalpontSystemCatalog::DECIMAL:
case CalpontSystemCatalog::UDECIMAL:
{
if (wc->functionParms()[0]->resultType().colWidth < 16)
if (wc->resultType().colWidth < datatypes::MAXDECIMALWIDTH)
{
func.reset(new WF_percentile<int64_t>(id, name));
}
else
else if (wc->resultType().colWidth == datatypes::MAXDECIMALWIDTH)
{
func.reset(new WF_percentile<int128_t>(id, name));
}
break;
}
case CalpontSystemCatalog::UDECIMAL:
{
if (wc->functionParms()[0]->resultType().colWidth < 16)
{
func.reset(new WF_percentile<uint64_t>(id, name));
}
else
{
func.reset(new WF_percentile<uint128_t>(id, name));
}
break;
}
case CalpontSystemCatalog::DOUBLE:
case CalpontSystemCatalog::UDOUBLE:
{