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
MCOL-641 Replaced NULL binary constants.
DataConvert::decimalToString, toString, writeIntPart, writeFractionalPart are not templates anymore.
This commit is contained in:
@ -44,6 +44,7 @@ using namespace execplan;
|
||||
#include "rowgroup.h"
|
||||
#include "dataconvert.h"
|
||||
#include "columnwidth.h"
|
||||
#include "widedecimalutils.h"
|
||||
|
||||
#include "collation.h"
|
||||
|
||||
@ -850,9 +851,7 @@ void Row::initToNull()
|
||||
|
||||
case 16 :
|
||||
{
|
||||
uint64_t *dec = reinterpret_cast<uint64_t*>(&data[offsets[i]]);
|
||||
dec[0] = joblist::BINARYNULL;
|
||||
dec[1] = joblist::BINARYEMPTYROW;
|
||||
utils::setWideDecimalNullValue(reinterpret_cast<int128_t&>(data[offsets[i]]));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -881,9 +880,7 @@ void Row::initToNull()
|
||||
break;
|
||||
case CalpontSystemCatalog::BINARY:
|
||||
{
|
||||
uint64_t *dec = reinterpret_cast<uint64_t*>(&data[offsets[i]]);
|
||||
dec[0] = joblist::BINARYNULL;
|
||||
dec[1] = joblist::BINARYEMPTYROW;
|
||||
utils::setWideDecimalNullValue(reinterpret_cast<int128_t&>(data[offsets[i]]));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -915,11 +912,11 @@ inline bool
|
||||
Row::isNullValue_offset<execplan::CalpontSystemCatalog::BINARY,32>(
|
||||
uint32_t offset) const
|
||||
{
|
||||
const int64_t *intPtr = reinterpret_cast<const int64_t*>(&data[offset]);
|
||||
return ((intPtr[0] == static_cast<int64_t>(joblist::BINARYNULL)) &&
|
||||
(intPtr[1] == static_cast<int64_t>(joblist::BINARYEMPTYROW)) &&
|
||||
(intPtr[2] == static_cast<int64_t>(joblist::BINARYEMPTYROW)) &&
|
||||
(intPtr[3] == static_cast<int64_t>(joblist::BINARYEMPTYROW)));
|
||||
const uint64_t *intPtr = reinterpret_cast<const uint64_t*>(&data[offset]);
|
||||
return ((intPtr[0] == static_cast<uint64_t>(utils::BINARYNULLVALUELOW)) &&
|
||||
(intPtr[1] == static_cast<uint64_t>(utils::BINARYNULLVALUELOW)) &&
|
||||
(intPtr[2] == static_cast<uint64_t>(utils::BINARYNULLVALUELOW)) &&
|
||||
(intPtr[3] == static_cast<uint64_t>(utils::BINARYEMPTYVALUEHIGH)));
|
||||
}
|
||||
|
||||
template<>
|
||||
@ -927,9 +924,8 @@ inline bool
|
||||
Row::isNullValue_offset<execplan::CalpontSystemCatalog::BINARY,16>(
|
||||
uint32_t offset) const
|
||||
{
|
||||
const int64_t *intPtr = reinterpret_cast<const int64_t*>(&data[offset]);
|
||||
return ((intPtr[0] == static_cast<int64_t>(joblist::BINARYNULL))
|
||||
&& (intPtr[1] == static_cast<int64_t>(joblist::BINARYEMPTYROW)));
|
||||
const int128_t *intPtr = reinterpret_cast<const int128_t*>(&data[offset]);
|
||||
return utils::isWideDecimalNullValue (*intPtr);
|
||||
}
|
||||
|
||||
template<>
|
||||
@ -937,9 +933,8 @@ inline bool
|
||||
Row::isNullValue_offset<execplan::CalpontSystemCatalog::DECIMAL,16>(
|
||||
uint32_t offset) const
|
||||
{
|
||||
const int64_t *intPtr = reinterpret_cast<const int64_t*>(&data[offset]);
|
||||
return ((intPtr[0] == static_cast<int64_t>(joblist::BINARYNULL))
|
||||
&& (intPtr[1] == static_cast<int64_t>(joblist::BINARYEMPTYROW)));
|
||||
const int128_t *intPtr = reinterpret_cast<const int128_t*>(&data[offset]);
|
||||
return utils::isWideDecimalNullValue (*intPtr);
|
||||
}
|
||||
|
||||
template<>
|
||||
@ -1059,8 +1054,7 @@ bool Row::isNullValue(uint32_t colIndex) const
|
||||
case CalpontSystemCatalog::UDECIMAL:
|
||||
{
|
||||
// WIP MCOL-641 Allmighty hack.
|
||||
int32_t width = getColumnWidth(colIndex);
|
||||
switch (width)
|
||||
switch (getColumnWidth(colIndex))
|
||||
{
|
||||
// MCOL-641
|
||||
case 16:
|
||||
|
Reference in New Issue
Block a user