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

Renamed datatypes/decimal.* into csdecimal to avoid collision with MDB.

This commit is contained in:
Roman Nozdrin
2020-03-05 03:27:17 +00:00
parent 238386bf63
commit 2e8e7d52c3
9 changed files with 133 additions and 28 deletions

View File

@ -18,6 +18,7 @@
#ifndef UTILS_COLWIDTH_H
#define UTILS_COLWIDTH_H
#include "branchpred.h"
namespace utils
{
@ -34,10 +35,12 @@ namespace utils
return width <= MAXLEGACYWIDTH;
}
// WIP MCOL-641 Replace with template
/** @brief Map a DECIMAL precision to data width in bytes */
inline uint8_t widthByPrecision(unsigned p)
{
if (LIKELY(p > 18 && p < 39))
return 16;
switch (p)
{
case 1:
@ -70,6 +73,7 @@ namespace utils
return 16;
}
}
inline uint8_t precisionByWidth(unsigned w)
{
switch(w)