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

MCOL-641 Initial version of Math operations for wide decimal.

This commit is contained in:
Roman Nozdrin
2020-03-12 19:39:10 +00:00
parent 62d0c82d75
commit b09f3088ca
22 changed files with 1323 additions and 213 deletions

View File

@ -18,7 +18,6 @@
#ifndef UTILS_COLWIDTH_H
#define UTILS_COLWIDTH_H
#include "calpontsystemcatalog.h"
#include "branchpred.h"
namespace utils
@ -36,13 +35,6 @@ namespace utils
return width <= MAXLEGACYWIDTH;
}
inline bool isWideDecimalType(const execplan::CalpontSystemCatalog::ColType& ct)
{
return ((ct.colDataType == execplan::CalpontSystemCatalog::DECIMAL ||
ct.colDataType == execplan::CalpontSystemCatalog::UDECIMAL) &&
ct.colWidth == MAXCOLUMNWIDTH);
}
/** @brief Map a DECIMAL precision to data width in bytes */
inline uint8_t widthByPrecision(unsigned p)
{

View File

@ -80,9 +80,7 @@ namespace utils
inline void int128Min(int128_t& val)
{
uint64_t* ptr = reinterpret_cast<uint64_t*>(&val);
ptr[0] = 0;
ptr[1] = 0x8000000000000000;
val = int128_t(0x8000000000000000LL) << 64;
}
inline void uint128Max(uint128_t& val)