1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +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

@ -39,9 +39,6 @@ public:
WindowFunctionType(id, name), fDistinct(id != WF__SUM && id != WF__AVG)
{
resetData();
utils::int128Max(fMax128);
utils::int128Min(fMin128);
utils::uint128Max(fMaxu128);
}
// pure virtual in base
@ -58,19 +55,17 @@ protected:
uint64_t fCount;
bool fDistinct;
std::set<T_IN> fSet;
int128_t fMax128;
int128_t fMin128;
uint128_t fMaxu128;
void checkSumLimit(long double val, long double sum);
void checkSumLimit(int128_t val, int128_t sum);
void checkSumLimit(uint128_t val, uint128_t sum);
void checkSumLimit(T_IN& val, T_OUT& sum);
int128_t calculateAvg(int128_t sum, uint64_t count, int scale);
uint128_t calculateAvg(uint128_t sum, uint64_t count, int scale);
long double calculateAvg(long double sum, uint64_t count, int scale);
};
template<>
void WF_sum_avg<long double,long double>::checkSumLimit(long double& val, long double& sum);
} // namespace
#endif // UTILS_WF_SUM_AVG_H