You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-641 Replaced NULL binary constants.
DataConvert::decimalToString, toString, writeIntPart, writeFractionalPart are not templates anymore.
This commit is contained in:
@ -40,6 +40,7 @@ using namespace boost;
|
||||
#include "stats.h"
|
||||
#include "primproc.h"
|
||||
#include "dataconvert.h"
|
||||
#include "widedecimalutils.h"
|
||||
using namespace logging;
|
||||
using namespace dbbc;
|
||||
using namespace primitives;
|
||||
@ -277,16 +278,17 @@ template<>
|
||||
inline bool isEmptyVal<32>(uint8_t type, const uint8_t* ival) // For BINARY
|
||||
{
|
||||
const uint64_t* val = reinterpret_cast<const uint64_t*>(ival);
|
||||
return ((val[0] == joblist::BINARYEMPTYROW) && (val[1] == joblist::BINARYEMPTYROW)
|
||||
&& (val[2] == joblist::BINARYEMPTYROW) && (val[3] == joblist::BINARYEMPTYROW));
|
||||
return ((val[0] == joblist::BINARYEMPTYVALUELOW)
|
||||
&& (val[1] == joblist::BINARYNULLVALUELOW)
|
||||
&& (val[2] == joblist::BINARYNULLVALUELOW)
|
||||
&& (val[3] == joblist::BINARYEMPTYVALUEHIGH));
|
||||
}
|
||||
|
||||
template<>
|
||||
inline bool isEmptyVal<16>(uint8_t type, const uint8_t* ival) // For BINARY
|
||||
{
|
||||
const uint64_t* val = reinterpret_cast<const uint64_t*>(ival);
|
||||
return ((val[0] == joblist::BINARYEMPTYROW) && (val[1] == joblist::BINARYEMPTYROW));
|
||||
|
||||
const int128_t* val = reinterpret_cast<const int128_t*>(ival);
|
||||
return utils::isWideDecimalEmptyValue (*val);
|
||||
}
|
||||
|
||||
template<>
|
||||
@ -410,19 +412,22 @@ inline bool isEmptyVal<1>(uint8_t type, const uint8_t* ival)
|
||||
template<int>
|
||||
inline bool isNullVal(uint8_t type, const uint8_t* val8);
|
||||
|
||||
// WIP This method only works for wide DECIMAL so far.
|
||||
template<>
|
||||
inline bool isNullVal<16>(uint8_t type, const uint8_t* ival) // For BINARY
|
||||
{
|
||||
const uint64_t* val = reinterpret_cast<const uint64_t*>(ival);
|
||||
return ((val[0] == joblist::BINARYNULL) && (val[1] == joblist::BINARYEMPTYROW));
|
||||
const int128_t* val = reinterpret_cast<const int128_t*>(ival);
|
||||
return utils::isWideDecimalNullValue (*val);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline bool isNullVal<32>(uint8_t type, const uint8_t* ival) // For BINARY
|
||||
{
|
||||
const uint64_t* val = reinterpret_cast<const uint64_t*>(ival);
|
||||
return ((val[0] == joblist::BINARYNULL) && (val[1] == joblist::BINARYEMPTYROW)
|
||||
&& (val[2] == joblist::BINARYEMPTYROW) && (val[3] == joblist::BINARYEMPTYROW));
|
||||
return ((val[0] == joblist::BINARYNULLVALUELOW)
|
||||
&& (val[1] == joblist::BINARYNULLVALUELOW)
|
||||
&& (val[2] == joblist::BINARYNULLVALUELOW)
|
||||
&& (val[3] == joblist::BINARYNULLVALUEHIGH));
|
||||
}
|
||||
|
||||
template<>
|
||||
|
@ -40,6 +40,7 @@ using namespace std;
|
||||
#include "primitiveserver.h"
|
||||
#include "primproc.h"
|
||||
#include "stats.h"
|
||||
#include "widedecimalutils.h"
|
||||
|
||||
using namespace messageqcpp;
|
||||
using namespace rowgroup;
|
||||
@ -1062,9 +1063,8 @@ const uint64_t ColumnCommand::getEmptyRowValue( const CSCDataType dataType, cons
|
||||
void ColumnCommand::getEmptyRowValue(const CSCDataType dataType,
|
||||
const int width, messageqcpp::ByteStream::hexbyte* space) const
|
||||
{
|
||||
uint64_t *ptr = reinterpret_cast<uint64_t*>(space);
|
||||
ptr[0] = joblist::BINARYEMPTYROW;
|
||||
ptr[1] = joblist::BINARYEMPTYROW;
|
||||
int128_t *val = reinterpret_cast<int128_t*>(space);
|
||||
utils::setWideDecimalEMptyValue(*val);
|
||||
}
|
||||
|
||||
void ColumnCommand::getLBIDList(uint32_t loopCount, vector<int64_t>* lbids)
|
||||
|
Reference in New Issue
Block a user