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

MCOL-4566: Extend CompressedDBFileHeader struct with new fields.

* This patch extends CompressedDBFileHeader struct with new fields:
  `fColumWidth`, `fColDataType`, which are necessary to rebuild extent map
  from the given file. Note: new fields do not change the memory
  layout of the struct, because the size is calculated as
  max(sizeof(CompressedDBFileHeader), HDR_BUF_LEN)).

* This patch changes API of some functions, by adding new function
  argument `colDataType` when needed, to be able to call `initHdr`
  function with colDataType value.
This commit is contained in:
Denis Khalikov
2021-03-05 14:48:53 +03:00
parent 5be4bfe647
commit a2efa1efeb
11 changed files with 138 additions and 54 deletions

View File

@ -191,7 +191,8 @@ int ColumnOpCompress1::flushFile(int rc, std::map<FID, FID>& columnOids)
int ColumnOpCompress1::expandAbbrevColumnExtent(
IDBDataFile* pFile, uint16_t dbRoot, const uint8_t* emptyVal, int width)
IDBDataFile* pFile, uint16_t dbRoot, const uint8_t* emptyVal, int width,
execplan::CalpontSystemCatalog::ColDataType colDataType )
{
// update the uncompressed initial chunk to full chunk
int rc = m_chunkManager->expandAbbrevColumnExtent(pFile, emptyVal, width);
@ -204,7 +205,8 @@ int ColumnOpCompress1::expandAbbrevColumnExtent(
}
// let the base to physically expand extent.
return FileOp::expandAbbrevColumnExtent(pFile, dbRoot, emptyVal, width);
return FileOp::expandAbbrevColumnExtent(pFile, dbRoot, emptyVal, width,
colDataType);
}