You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
MCOL-987 Add LZ4 compression.
* Adds CompressInterfaceLZ4 which uses LZ4 API for compress/uncompress. * Adds CMake machinery to search LZ4 on running host. * All methods which use static data and do not modify any internal data - become `static`, so we can use them without creation of the specific object. This is possible, because the header specification has not been modified. We still use 2 sections in header, first one with file meta data, the second one with pointers for compressed chunks. * Methods `compress`, `uncompress`, `maxCompressedSize`, `getUncompressedSize` - become pure virtual, so we can override them for the other compression algos. * Adds method `getChunkMagicNumber`, so we can verify chunk magic number for each compression algo. * Renames "s/IDBCompressInterface/CompressInterface/g" according to requirement.
This commit is contained in:
@@ -450,7 +450,7 @@ int ColumnInfo::createDelayedFileIfNeeded( const std::string& tableName )
|
||||
if (column.dctnry.fCompressionType != 0)
|
||||
{
|
||||
DctnryCompress1* tempD1;
|
||||
tempD1 = new DctnryCompress1;
|
||||
tempD1 = new DctnryCompress1(column.dctnry.fCompressionType);
|
||||
tempD1->setMaxActiveChunkNum(1);
|
||||
tempD1->setBulkFlag(true);
|
||||
tempD = tempD1;
|
||||
@@ -668,7 +668,7 @@ int ColumnInfo::extendColumnNewExtent(
|
||||
uint16_t segmentNew = 0;
|
||||
BRM::LBID_t startLbid;
|
||||
|
||||
char hdr[ compress::IDBCompressInterface::HDR_BUF_LEN * 2 ];
|
||||
char hdr[ compress::CompressInterface::HDR_BUF_LEN * 2 ];
|
||||
|
||||
// Extend the column by adding an extent to the next
|
||||
// DBRoot, partition, and segment file in the rotation
|
||||
@@ -1684,7 +1684,8 @@ int ColumnInfo::openDctnryStore( bool bMustExist )
|
||||
|
||||
if ( column.dctnry.fCompressionType != 0)
|
||||
{
|
||||
DctnryCompress1* dctnryCompress1 = new DctnryCompress1;
|
||||
DctnryCompress1* dctnryCompress1 =
|
||||
new DctnryCompress1(column.dctnry.fCompressionType);
|
||||
dctnryCompress1->setMaxActiveChunkNum(1);
|
||||
dctnryCompress1->setBulkFlag(true);
|
||||
fStore = dctnryCompress1;
|
||||
|
Reference in New Issue
Block a user