1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

MCOL-641 This commit introduces GTest Suite into CS.

Binary NULL magic now consists of a series of BINARYEMPTYROW-s + BINARYNULL
in the end.

ByteStream now has hexbyte alias.

Added ColumnCommand::getEmptyRowValue to support 16 byte EMPTY values.
This commit is contained in:
Roman Nozdrin
2020-02-19 18:50:48 +00:00
parent 31d597d87e
commit f73de30427
13 changed files with 283 additions and 87 deletions

View File

@ -285,7 +285,6 @@ template<>
inline bool isEmptyVal<16>(uint8_t type, const uint8_t* ival) // For BINARY
{
const uint64_t* val = reinterpret_cast<const uint64_t*>(ival);
// WIP ugly speed hack
return ((val[0] == joblist::BINARYEMPTYROW) && (val[1] == joblist::BINARYEMPTYROW));
}
@ -415,15 +414,15 @@ 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::BINARYNULL));
return ((val[0] == joblist::BINARYEMPTYROW) && (val[1] == joblist::BINARYNULL));
}
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::BINARYNULL)
&& (val[2] == joblist::BINARYNULL) && (val[3] == joblist::BINARYNULL));
return ((val[0] == joblist::BINARYEMPTYROW) && (val[1] == joblist::BINARYEMPTYROW)
&& (val[2] == joblist::BINARYEMPTYROW) && (val[3] == joblist::BINARYNULL));
}
template<>
@ -614,7 +613,7 @@ inline bool isMinMaxValid(const NewColRequestHeader* in)
case CalpontSystemCatalog::DECIMAL:
case CalpontSystemCatalog::UDECIMAL:
return (in->DataSize <= 16);
return (in->DataSize <= 16 );
default:
return false;