You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
Adding mcs_basic_types.h
For now it consists of only: using int128_t = __int128; using uint128_t = unsigned __int128; All new privitive data types should go into this file in the future.
This commit is contained in:
committed by
Roman Nozdrin
parent
916950d1e9
commit
d5c6645ba1
@ -302,7 +302,7 @@ void BulkLoadBuffer::convert(char* field, int fieldLength,
|
||||
int32_t iDate;
|
||||
char charTmpBuf[MAX_COLUMN_BOUNDARY + 1] = {0};
|
||||
long long llVal = 0, llDate = 0;
|
||||
__int128 bigllVal = 0;
|
||||
int128_t bigllVal = 0;
|
||||
uint64_t tmp64;
|
||||
uint32_t tmp32;
|
||||
uint8_t ubiVal;
|
||||
|
@ -45,12 +45,12 @@ public:
|
||||
int64_t satCount;
|
||||
union
|
||||
{
|
||||
__int128 bigMinBufferVal;
|
||||
int128_t bigMinBufferVal;
|
||||
int64_t minBufferVal_;
|
||||
};
|
||||
union
|
||||
{
|
||||
__int128 bigMaxBufferVal;
|
||||
int128_t bigMaxBufferVal;
|
||||
int64_t maxBufferVal_;
|
||||
};
|
||||
BLBufferStats(ColDataType colDataType) : satCount(0)
|
||||
|
@ -92,7 +92,7 @@ void ColExtInf::addOrUpdateEntryTemplate( RID lastInputRow,
|
||||
// If all rows had null value for this column, then minVal will be
|
||||
// MAX_INT and maxVal will be MIN_INT (see getCPInfoForBRM()).
|
||||
|
||||
__int128 bigMinValInit;
|
||||
int128_t bigMinValInit;
|
||||
utils::int128Max(bigMinValInit);
|
||||
if ((iter->second.fMinVal == LLONG_MIN && width <= 8) ||
|
||||
(iter->second.fbigMinVal == bigMinValInit && width > 8)) // init the range
|
||||
@ -124,12 +124,12 @@ void ColExtInf::addOrUpdateEntryTemplate( RID lastInputRow,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (static_cast<unsigned __int128>(minVal)
|
||||
< static_cast<unsigned __int128>(iter->second.fbigMinVal))
|
||||
if (static_cast<uint128_t>(minVal)
|
||||
< static_cast<uint128_t>(iter->second.fbigMinVal))
|
||||
iter->second.fbigMinVal = minVal;
|
||||
|
||||
if (static_cast<unsigned __int128>(maxVal)
|
||||
> static_cast<unsigned __int128>(iter->second.fbigMaxVal))
|
||||
if (static_cast<uint128_t>(maxVal)
|
||||
> static_cast<uint128_t>(iter->second.fbigMaxVal))
|
||||
iter->second.fbigMaxVal = maxVal;
|
||||
}
|
||||
}
|
||||
@ -214,8 +214,8 @@ void ColExtInf::getCPInfoForBRM( JobColumn column, BRMReporter& brmReporter )
|
||||
// if applicable (indicating an extent with no non-NULL values).
|
||||
int64_t minVal = iter->second.fMinVal;
|
||||
int64_t maxVal = iter->second.fMaxVal;
|
||||
__int128 bigMinVal = iter->second.fbigMinVal;
|
||||
__int128 bigMaxVal = iter->second.fbigMaxVal;
|
||||
int128_t bigMinVal = iter->second.fbigMinVal;
|
||||
int128_t bigMaxVal = iter->second.fbigMaxVal;
|
||||
|
||||
if ( bIsChar )
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
fNewExtent(true) { }
|
||||
|
||||
// Used to create entry for a new extent, with LBID not yet allocated
|
||||
ColExtInfEntry(__int128 bigMinVal, __int128 bigMaxVal) :
|
||||
ColExtInfEntry(int128_t bigMinVal, int128_t bigMaxVal) :
|
||||
fLbid(INVALID_LBID),
|
||||
fNewExtent(true),
|
||||
fbigMinVal(bigMinVal),
|
||||
@ -102,11 +102,11 @@ public:
|
||||
fNewExtent(true) { }
|
||||
|
||||
// Used to create entry for a new extent, with LBID not yet allocated
|
||||
ColExtInfEntry(unsigned __int128 bigMinVal, unsigned __int128 bigMaxVal) :
|
||||
ColExtInfEntry(uint128_t bigMinVal, uint128_t bigMaxVal) :
|
||||
fLbid(INVALID_LBID),
|
||||
fNewExtent(true),
|
||||
fbigMinVal(static_cast<__int128>(bigMinVal)),
|
||||
fbigMaxVal(static_cast<__int128>(bigMaxVal)) { }
|
||||
fbigMinVal(static_cast<int128_t>(bigMinVal)),
|
||||
fbigMaxVal(static_cast<int128_t>(bigMaxVal)) { }
|
||||
|
||||
BRM::LBID_t fLbid; // LBID for an extent; should be the starting LBID
|
||||
int64_t fMinVal; // minimum value for extent associated with LBID
|
||||
@ -114,12 +114,12 @@ public:
|
||||
bool fNewExtent;// is this a new extent
|
||||
union
|
||||
{
|
||||
__int128 fbigMinVal;
|
||||
int128_t fbigMinVal;
|
||||
int64_t fMinVal_;
|
||||
};
|
||||
union
|
||||
{
|
||||
__int128 fbigMaxVal;
|
||||
int128_t fbigMaxVal;
|
||||
int64_t fMaxVal_;
|
||||
};
|
||||
};
|
||||
@ -159,8 +159,8 @@ public:
|
||||
int width ) { }
|
||||
|
||||
virtual void addOrUpdateEntry( RID lastInputRow,
|
||||
__int128 minVal,
|
||||
__int128 maxVal,
|
||||
int128_t minVal,
|
||||
int128_t maxVal,
|
||||
ColDataType colDataType,
|
||||
int width ) { }
|
||||
|
||||
@ -231,7 +231,7 @@ public:
|
||||
}
|
||||
|
||||
virtual void addOrUpdateEntry( RID lastInputRow,
|
||||
__int128 minVal, __int128 maxVal,
|
||||
int128_t minVal, int128_t maxVal,
|
||||
ColDataType colDataType,
|
||||
int width )
|
||||
{
|
||||
|
@ -57,7 +57,6 @@ typedef uint32_t FID; /** @brief File ID */
|
||||
typedef uint64_t RID; /** @brief Row ID */
|
||||
typedef uint32_t TxnID; /** @brief Transaction ID (New)*/
|
||||
typedef uint32_t HWM; /** @brief high water mark */
|
||||
typedef unsigned __int128 uint128_t;
|
||||
|
||||
/************************************************************************
|
||||
* Type enumerations
|
||||
|
@ -56,8 +56,6 @@ struct RefcolInfo
|
||||
unsigned numExtents;
|
||||
};
|
||||
|
||||
using int128_t = __int128;
|
||||
using uint128_t = unsigned __int128;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
Reference in New Issue
Block a user