1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-4412 Introduce TypeHandler::getEmptyValueForType to return const ptr for an empty value

WE changes for SQL DML and DDL operations

Changes for bulk operations

Changes for scanning operations

Cleanup
This commit is contained in:
Roman Nozdrin
2021-01-15 16:02:10 +00:00
parent 16b52860e8
commit 5fce19df0a
27 changed files with 741 additions and 580 deletions

View File

@ -821,8 +821,8 @@ int ChunkManager::fetchChunkFromFile(IDBDataFile* pFile, int64_t id, ChunkData*&
void ChunkManager::initializeColumnChunk(char* buf, CompFileData* fileData)
{
int size = UNCOMPRESSED_CHUNK_SIZE;
uint8_t* emptyVal = (uint8_t*) alloca(fileData->fColWidth);
fFileOp->getEmptyRowValue(fileData->fColDataType, fileData->fColWidth, emptyVal);
const uint8_t* emptyVal = fFileOp->getEmptyRowValue(fileData->fColDataType,
fileData->fColWidth);
fFileOp->setEmptyBuf((unsigned char*)buf, size, emptyVal, fileData->fColWidth);
}
@ -1343,7 +1343,7 @@ inline int ChunkManager::writeHeader_(CompFileData* fileData, int ptrSecSize)
// For the specified segment file (pFile), read in an abbreviated/compressed
// chunk extent, uncompress, and expand to a full chunk for a full extent.
//------------------------------------------------------------------------------
int ChunkManager::expandAbbrevColumnExtent(IDBDataFile* pFile, uint8_t* emptyVal, int width)
int ChunkManager::expandAbbrevColumnExtent(IDBDataFile* pFile, const uint8_t* emptyVal, int width)
{
map<IDBDataFile*, CompFileData*>::iterator i = fFilePtrMap.find(pFile);