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 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:
@ -165,6 +165,7 @@ void ColumnCommand::loadData()
|
||||
{
|
||||
// fill remaining blocks with empty values when col scan
|
||||
int blockLen = BLOCK_SIZE / colType.colWidth;
|
||||
ByteStream::hexbyte* hPtr = NULL;
|
||||
ByteStream::octbyte* oPtr = NULL;
|
||||
ByteStream::quadbyte* qPtr = NULL;
|
||||
ByteStream::byte* bPtr = NULL;
|
||||
@ -183,6 +184,10 @@ void ColumnCommand::loadData()
|
||||
if (colType.colWidth == 8)
|
||||
oPtr = reinterpret_cast<ByteStream::octbyte*>(&bpp->blockData[i * BLOCK_SIZE]);
|
||||
|
||||
if (colType.colWidth == 16)
|
||||
hPtr = reinterpret_cast<ByteStream::hexbyte*>(&bpp->blockData[i * BLOCK_SIZE]);
|
||||
|
||||
|
||||
for (int idx = 0; idx < blockLen; idx++)
|
||||
{
|
||||
if (bPtr && colType.colWidth == 1)
|
||||
@ -208,9 +213,7 @@ void ColumnCommand::loadData()
|
||||
}
|
||||
else if (colType.colWidth == 16)
|
||||
{
|
||||
uint64_t *ptr = reinterpret_cast<uint64_t*>(&bpp->blockData[i * BLOCK_SIZE] + (idx*16) );
|
||||
*ptr = joblist::BINARYEMPTYROW;
|
||||
*(ptr + 1) = joblist::BINARYEMPTYROW;
|
||||
getEmptyRowValue(colType.colDataType, colType.colWidth, &hPtr[idx]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -965,7 +968,7 @@ void ColumnCommand::enableFilters()
|
||||
* RETURN:
|
||||
* emptyVal - the value of empty row
|
||||
***********************************************************/
|
||||
uint64_t ColumnCommand::getEmptyRowValue( const execplan::CalpontSystemCatalog::ColDataType dataType, const int width ) const
|
||||
const uint64_t ColumnCommand::getEmptyRowValue( const CSCDataType dataType, const int width ) const
|
||||
{
|
||||
uint64_t emptyVal = 0;
|
||||
int offset;
|
||||
@ -1056,6 +1059,16 @@ uint64_t ColumnCommand::getEmptyRowValue( const execplan::CalpontSystemCatalog::
|
||||
return emptyVal;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ColumnCommand::getLBIDList(uint32_t loopCount, vector<int64_t>* lbids)
|
||||
{
|
||||
int64_t firstLBID = lbid, lastLBID = firstLBID + (loopCount * colType.colWidth) - 1, i;
|
||||
|
Reference in New Issue
Block a user