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

clang format apply

This commit is contained in:
Leonid Fedorov
2022-01-21 16:43:49 +00:00
parent 6b6411229f
commit 04752ec546
1376 changed files with 393460 additions and 412662 deletions

View File

@ -47,73 +47,67 @@ class ColumnInfo;
*/
class ColumnBufferCompressed : public ColumnBuffer
{
public:
/** @brief default Constructor
*/
ColumnBufferCompressed(ColumnInfo* pColInfo, Log* logger);
public:
/** @brief default Destructor
*/
virtual ~ColumnBufferCompressed();
/** @brief default Constructor
*/
ColumnBufferCompressed( ColumnInfo* pColInfo, Log* logger);
/** @brief Final flushing of data and headers prior to closing the file.
* @param bTruncFile is file to be truncated
* @return NO_ERROR or success
*/
virtual int finishFile(bool bTruncFile);
/** @brief default Destructor
*/
virtual ~ColumnBufferCompressed();
/** @brief Reset the ColBuf to-be-compressed buffer prior to importing the
* next extent.
* @param startFileOffset Byte offset where next extent chunk will start
*/
virtual int resetToBeCompressedColBuf(long long& startFileOffset);
/** @brief Final flushing of data and headers prior to closing the file.
* @param bTruncFile is file to be truncated
* @return NO_ERROR or success
*/
virtual int finishFile(bool bTruncFile);
/** @brief file mutator
*
* @param cFile Destination FILE stream where buffer data will be written
* @param startHwm Starting HWM for cFile
* @param hdrs Headers with ptr information.
*/
virtual int setDbFile(IDBDataFile* const cFile, HWM startHwm, const char* hdrs);
/** @brief Reset the ColBuf to-be-compressed buffer prior to importing the
* next extent.
* @param startFileOffset Byte offset where next extent chunk will start
*/
virtual int resetToBeCompressedColBuf(long long& startFileOffset );
/** @brief Write data to FILE
*
* @param startOffset The buffer offset from where the write should begin
* @param writeSize The number of bytes to be written to the file
* @param fillUpWEmpties The flag to fill the buffer with empty magic
* values up to the block boundary.
*/
virtual int writeToFile(int startOffset, int writeSize, bool fillUpWEmpties = false);
/** @brief file mutator
*
* @param cFile Destination FILE stream where buffer data will be written
* @param startHwm Starting HWM for cFile
* @param hdrs Headers with ptr information.
*/
virtual int setDbFile(IDBDataFile* const cFile, HWM startHwm, const char* hdrs);
private:
// Disable copy constructor and assignment operator by declaring and
// not defining.
ColumnBufferCompressed(const ColumnBufferCompressed&);
ColumnBufferCompressed& operator=(const ColumnBufferCompressed&);
/** @brief Write data to FILE
*
* @param startOffset The buffer offset from where the write should begin
* @param writeSize The number of bytes to be written to the file
* @param fillUpWEmpties The flag to fill the buffer with empty magic
* values up to the block boundary.
*/
virtual int writeToFile(int startOffset, int writeSize,
bool fillUpWEmpties = false);
// Compress and flush the to-be-compressed buffer; updates header if needed
int compressAndFlush(bool bFinishFile);
int initToBeCompressedBuffer(long long& startFileOffset);
// Initialize the to-be-compressed buffer
int saveCompressionHeaders(); // Saves compression headers to the db file
private:
// Disable copy constructor and assignment operator by declaring and
// not defining.
ColumnBufferCompressed(const ColumnBufferCompressed&);
ColumnBufferCompressed& operator=(const ColumnBufferCompressed&);
// Compress and flush the to-be-compressed buffer; updates header if needed
int compressAndFlush(bool bFinishFile);
int initToBeCompressedBuffer( long long& startFileOffset);
// Initialize the to-be-compressed buffer
int saveCompressionHeaders(); // Saves compression headers to the db file
unsigned char* fToBeCompressedBuffer; // data waiting to be compressed
size_t fToBeCompressedCapacity;//size of comp buffer;
// should always be 4MB, unless
// working with abbrev extent.
size_t fNumBytes; // num Bytes in comp buffer
compress::CompressorPool fCompressorPool; // data compression object pool
compress::CompChunkPtrList
fChunkPtrs; // col file header information
bool fPreLoadHWMChunk; // preload 1st HWM chunk only
unsigned int fUserPaddingBytes; // compressed chunk padding
bool fFlushedStartHwmChunk; // have we rewritten the hdr
// for the starting HWM chunk
unsigned char* fToBeCompressedBuffer; // data waiting to be compressed
size_t fToBeCompressedCapacity; // size of comp buffer;
// should always be 4MB, unless
// working with abbrev extent.
size_t fNumBytes; // num Bytes in comp buffer
compress::CompressorPool fCompressorPool; // data compression object pool
compress::CompChunkPtrList fChunkPtrs; // col file header information
bool fPreLoadHWMChunk; // preload 1st HWM chunk only
unsigned int fUserPaddingBytes; // compressed chunk padding
bool fFlushedStartHwmChunk; // have we rewritten the hdr
// for the starting HWM chunk
};
}
} // namespace WriteEngine