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

MCOL-641 Replaced IDB_Decima.__v union with int128_t attribute.

Moved all tests into ./test

Introduced ./datatypes directory
This commit is contained in:
Roman Nozdrin
2020-03-03 15:51:55 +00:00
parent 824615a55b
commit 238386bf63
17 changed files with 398 additions and 106 deletions

View File

@ -37,7 +37,6 @@
#include "dataconvert.h"
using int128_t = __int128;
using uint128_t = unsigned __int128;
namespace messageqcpp
{
@ -66,14 +65,14 @@ struct IDB_Decimal
{
IDB_Decimal(): value(0), scale(0), precision(0)
{
__v.__s128 = 0;
s128Value = 0;
}
IDB_Decimal(int64_t val, int8_t s, uint8_t p) :
value (val),
scale(s),
precision(p)
{
__v.__s128 = 0;
s128Value = 0;
}
int decimalComp(const IDB_Decimal& d) const
@ -158,11 +157,7 @@ struct IDB_Decimal
return (decimalComp(rhs) != 0);
}
union {
uint128_t __u128;
int128_t __s128;
int64_t __s64[2];
} __v;
int128_t s128Value;
int64_t value;
int8_t scale; // 0~38
uint8_t precision; // 1~38