1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

MCOL-641 Refactor empty value implementation in writeengine.

This commit is contained in:
Gagan Goel
2020-03-02 13:23:07 -05:00
committed by Roman Nozdrin
parent 97ee1609b2
commit 824615a55b
31 changed files with 418 additions and 812 deletions

View File

@@ -115,12 +115,13 @@ int ColumnBuffer::writeToFile(int startOffset, int writeSize, bool fillUpWEmptie
{
BlockOp blockOp;
newBuf = new unsigned char[BYTE_PER_BLOCK];
uint64_t EmptyValue = blockOp.getEmptyRowValue(fColInfo->column.dataType,
fColInfo->column.width);
uint8_t* emptyVal = (uint8_t*) alloca(fColInfo->column.width);
blockOp.getEmptyRowValue(fColInfo->column.dataType,
fColInfo->column.width, emptyVal);
::memcpy(static_cast<void *>(newBuf),
static_cast<const void *>(fBuffer + startOffset), writeSize);
blockOp.setEmptyBuf(newBuf + writeSize, BYTE_PER_BLOCK - writeSize,
EmptyValue, fColInfo->column.width);
emptyVal, fColInfo->column.width);
}
#ifdef PROFILE
Stats::startParseEvent(WE_STATS_WRITE_COL);