You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
chore(codestyle): mark virtual methods as override
This commit is contained in:
committed by
Leonid Fedorov
parent
ad80ab40aa
commit
0ab03c7258
@ -21,7 +21,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "we_dbfileop.h"
|
||||
#include "brmtypes.h"
|
||||
@ -54,7 +54,7 @@ class ColumnOp : public DbFileOp
|
||||
/**
|
||||
* @brief Default Destructor
|
||||
*/
|
||||
EXPORT virtual ~ColumnOp();
|
||||
EXPORT ~ColumnOp() override;
|
||||
|
||||
EXPORT virtual int allocRowId(const TxnID& txnid, bool useStartingExtent, Column& column, uint64_t totalRow,
|
||||
RID* rowIdArray, HWM& hwm, bool& newExtent, uint64_t& rowsLeft, HWM& newHwm,
|
||||
@ -145,7 +145,7 @@ class ColumnOp : public DbFileOp
|
||||
*/
|
||||
EXPORT int extendColumn(const Column& column, bool leaveFileOpen, HWM hwm, BRM::LBID_t startLbid,
|
||||
int allocSize, uint16_t dbRoot, uint32_t partition, uint16_t segment,
|
||||
std::string& segFile, IDBDataFile*& pFile, bool& newFile, char* hdrs = NULL);
|
||||
std::string& segFile, IDBDataFile*& pFile, bool& newFile, char* hdrs = nullptr);
|
||||
|
||||
/**
|
||||
* @brief Add an extent to the OID specified in the column argument.
|
||||
@ -165,7 +165,7 @@ class ColumnOp : public DbFileOp
|
||||
*/
|
||||
EXPORT int addExtent(const Column& column, uint16_t dbRoot, uint32_t partition, uint16_t segment,
|
||||
std::string& segFile, BRM::LBID_t& startLbid, bool& newFile, int& allocSize,
|
||||
char* hdrs = NULL);
|
||||
char* hdrs = nullptr);
|
||||
|
||||
/**
|
||||
* @brief Get columne data type
|
||||
@ -216,13 +216,13 @@ class ColumnOp : public DbFileOp
|
||||
* @brief Write row(s)
|
||||
*/
|
||||
EXPORT virtual int writeRow(Column& curCol, uint64_t totalRow, const RID* rowIdArray, const void* valArray,
|
||||
void* oldValArray = 0, bool bDelete = false);
|
||||
void* oldValArray = nullptr, bool bDelete = false);
|
||||
|
||||
/**
|
||||
* @brief Write row(s) for delete @Bug 1886,2870
|
||||
*/
|
||||
EXPORT virtual int writeRows(Column& curCol, uint64_t totalRow, const RIDList& ridList,
|
||||
const void* valArray, void* oldValArray = 0, bool bDelete = false);
|
||||
const void* valArray, void* oldValArray = nullptr, bool bDelete = false);
|
||||
|
||||
/**
|
||||
* @brief MCOL-5021 Read-only version of the writeRows() function above.
|
||||
@ -232,13 +232,13 @@ class ColumnOp : public DbFileOp
|
||||
database files.
|
||||
*/
|
||||
EXPORT virtual int writeRowsReadOnly(Column& curCol, uint64_t totalRow, const RIDList& ridList,
|
||||
void* oldValArray = 0);
|
||||
void* oldValArray = nullptr);
|
||||
|
||||
/**
|
||||
* @brief Write row(s) for update @Bug 1886,2870
|
||||
*/
|
||||
EXPORT virtual int writeRowsValues(Column& curCol, uint64_t totalRow, const RIDList& ridList,
|
||||
const void* valArray, void* oldValArray = 0);
|
||||
const void* valArray, void* oldValArray = nullptr);
|
||||
|
||||
/**
|
||||
* @brief Test if the pFile is an abbreviated extent.
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "we_colop.h"
|
||||
#include "we_chunkmanager.h"
|
||||
@ -45,35 +45,35 @@ class ColumnOpCompress0 : public ColumnOp
|
||||
/**
|
||||
* @brief Default Destructor
|
||||
*/
|
||||
EXPORT virtual ~ColumnOpCompress0();
|
||||
EXPORT ~ColumnOpCompress0() override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in ColumnOp
|
||||
*/
|
||||
IDBDataFile* openFile(const Column& column, uint16_t dbRoot, uint32_t partition, uint16_t segment,
|
||||
std::string& segFile, bool useTmpSuffix, const char* mode = "r+b",
|
||||
int ioBuffSize = DEFAULT_BUFSIZ, bool isReadOnly = false) const;
|
||||
int ioBuffSize = DEFAULT_BUFSIZ, bool isReadOnly = false) const override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in ColumnOp
|
||||
*/
|
||||
bool abbreviatedExtent(IDBDataFile* pFile, int colWidth) const;
|
||||
bool abbreviatedExtent(IDBDataFile* pFile, int colWidth) const override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in ColumnOp
|
||||
*/
|
||||
int blocksInFile(IDBDataFile* pFile) const;
|
||||
int blocksInFile(IDBDataFile* pFile) const override;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief virtual method in ColumnOp
|
||||
*/
|
||||
int readBlock(IDBDataFile* pFile, unsigned char* readBuf, const uint64_t fbo);
|
||||
int readBlock(IDBDataFile* pFile, unsigned char* readBuf, const uint64_t fbo) override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in ColumnOp
|
||||
*/
|
||||
int saveBlock(IDBDataFile* pFile, const unsigned char* writeBuf, const uint64_t fbo);
|
||||
int saveBlock(IDBDataFile* pFile, const unsigned char* writeBuf, const uint64_t fbo) override;
|
||||
|
||||
private:
|
||||
};
|
||||
@ -85,47 +85,47 @@ class ColumnOpCompress1 : public ColumnOp
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
EXPORT ColumnOpCompress1(uint32_t compressionType, Log* logger = 0);
|
||||
EXPORT ColumnOpCompress1(uint32_t compressionType, Log* logger = nullptr);
|
||||
|
||||
/**
|
||||
* @brief Default Destructor
|
||||
*/
|
||||
EXPORT virtual ~ColumnOpCompress1();
|
||||
EXPORT ~ColumnOpCompress1() override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in FileOp
|
||||
*/
|
||||
EXPORT int flushFile(int rc, std::map<FID, FID>& columnOids);
|
||||
EXPORT int flushFile(int rc, std::map<FID, FID>& columnOids) override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in FileOp
|
||||
*/
|
||||
int expandAbbrevColumnExtent(IDBDataFile* pFile, uint16_t dbRoot, const uint8_t* emptyVal, int width,
|
||||
execplan::CalpontSystemCatalog::ColDataType colDataType);
|
||||
execplan::CalpontSystemCatalog::ColDataType colDataType) override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in ColumnOp
|
||||
*/
|
||||
IDBDataFile* openFile(const Column& column, uint16_t dbRoot, uint32_t partition, uint16_t segment,
|
||||
std::string& segFile, bool useTmpSuffix, const char* mode = "r+b",
|
||||
int ioBuffSize = DEFAULT_BUFSIZ, bool isReadOnly = false) const;
|
||||
int ioBuffSize = DEFAULT_BUFSIZ, bool isReadOnly = false) const override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in ColumnOp
|
||||
*/
|
||||
bool abbreviatedExtent(IDBDataFile* pFile, int colWidth) const;
|
||||
bool abbreviatedExtent(IDBDataFile* pFile, int colWidth) const override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in ColumnOp
|
||||
*/
|
||||
int blocksInFile(IDBDataFile* pFile) const;
|
||||
int blocksInFile(IDBDataFile* pFile) const override;
|
||||
|
||||
// void chunkManager(ChunkManager* cm);
|
||||
|
||||
/**
|
||||
* @brief virtual method in FileOp
|
||||
*/
|
||||
void setTransId(const TxnID& transId)
|
||||
void setTransId(const TxnID& transId) override
|
||||
{
|
||||
ColumnOp::setTransId(transId);
|
||||
|
||||
@ -133,12 +133,12 @@ class ColumnOpCompress1 : public ColumnOp
|
||||
m_chunkManager->setTransId(transId);
|
||||
}
|
||||
|
||||
void setBulkFlag(bool isBulkLoad)
|
||||
void setBulkFlag(bool isBulkLoad) override
|
||||
{
|
||||
m_chunkManager->setBulkFlag(isBulkLoad);
|
||||
};
|
||||
|
||||
void setFixFlag(bool isFix)
|
||||
void setFixFlag(bool isFix) override
|
||||
{
|
||||
m_chunkManager->setFixFlag(isFix);
|
||||
};
|
||||
@ -147,22 +147,22 @@ class ColumnOpCompress1 : public ColumnOp
|
||||
/**
|
||||
* @brief virtual method in FileOp
|
||||
*/
|
||||
int updateColumnExtent(IDBDataFile* pFile, int nBlocks, int64_t lbid);
|
||||
int updateColumnExtent(IDBDataFile* pFile, int nBlocks, int64_t lbid) override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in ColumnOp
|
||||
*/
|
||||
void closeColumnFile(Column& column) const;
|
||||
void closeColumnFile(Column& column) const override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in ColumnOp
|
||||
*/
|
||||
int readBlock(IDBDataFile* pFile, unsigned char* readBuf, const uint64_t fbo);
|
||||
int readBlock(IDBDataFile* pFile, unsigned char* readBuf, const uint64_t fbo) override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in ColumnOp
|
||||
*/
|
||||
int saveBlock(IDBDataFile* pFile, const unsigned char* writeBuf, const uint64_t fbo);
|
||||
int saveBlock(IDBDataFile* pFile, const unsigned char* writeBuf, const uint64_t fbo) override;
|
||||
|
||||
/**
|
||||
* @brief Set the IsInsert flag in the ChunkManager.
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "../dictionary/we_dctnry.h"
|
||||
#include "we_chunkmanager.h"
|
||||
@ -43,7 +43,7 @@ class DctnryCompress0 : public Dctnry
|
||||
/**
|
||||
* @brief Default Destructor
|
||||
*/
|
||||
EXPORT virtual ~DctnryCompress0();
|
||||
EXPORT ~DctnryCompress0() override;
|
||||
};
|
||||
|
||||
/** Class DctnryCompress1 */
|
||||
@ -53,55 +53,56 @@ class DctnryCompress1 : public Dctnry
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
EXPORT DctnryCompress1(uint32_t compressionType, Log* logger = 0);
|
||||
EXPORT DctnryCompress1(uint32_t compressionType, Log* logger = nullptr);
|
||||
|
||||
/**
|
||||
* @brief Default Destructor
|
||||
*/
|
||||
EXPORT virtual ~DctnryCompress1();
|
||||
EXPORT ~DctnryCompress1() override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in FileOp
|
||||
*/
|
||||
EXPORT int flushFile(int rc, std::map<FID, FID>& columnOids);
|
||||
EXPORT int flushFile(int rc, std::map<FID, FID>& columnOids) override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in DBFileOp
|
||||
*/
|
||||
EXPORT int readDBFile(IDBDataFile* pFile, unsigned char* readBuf, const uint64_t lbid,
|
||||
const bool isFbo = false);
|
||||
const bool isFbo = false) override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in DBFileOp
|
||||
*/
|
||||
EXPORT int writeDBFile(IDBDataFile* pFile, const unsigned char* writeBuf, const uint64_t lbid,
|
||||
const int numOfBlock = 1);
|
||||
const int numOfBlock = 1) override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in DBFileOp
|
||||
*/
|
||||
EXPORT int writeDBFileNoVBCache(IDBDataFile* pFile, const unsigned char* writeBuf, const int fbo,
|
||||
const int numOfBlock = 1);
|
||||
const int numOfBlock = 1) override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in Dctnry
|
||||
*/
|
||||
IDBDataFile* createDctnryFile(const char* name, int width, const char* mode, int ioBuffSize, int64_t lbid);
|
||||
IDBDataFile* createDctnryFile(const char* name, int width, const char* mode, int ioBuffSize,
|
||||
int64_t lbid) override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in Dctnry
|
||||
*/
|
||||
IDBDataFile* openDctnryFile(bool useTmpSuffix);
|
||||
IDBDataFile* openDctnryFile(bool useTmpSuffix) override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in Dctnry
|
||||
*/
|
||||
void closeDctnryFile(bool doFlush, std::map<FID, FID>& columnOids);
|
||||
void closeDctnryFile(bool doFlush, std::map<FID, FID>& columnOids) override;
|
||||
|
||||
/**
|
||||
* @brief virtual method in Dctnry
|
||||
*/
|
||||
int numOfBlocksInFile();
|
||||
int numOfBlocksInFile() override;
|
||||
|
||||
/**
|
||||
* @brief For bulkload to use
|
||||
@ -110,15 +111,15 @@ class DctnryCompress1 : public Dctnry
|
||||
{
|
||||
m_chunkManager->setMaxActiveChunkNum(maxActiveChunkNum);
|
||||
};
|
||||
void setBulkFlag(bool isBulkLoad)
|
||||
void setBulkFlag(bool isBulkLoad) override
|
||||
{
|
||||
m_chunkManager->setBulkFlag(isBulkLoad);
|
||||
};
|
||||
void setFixFlag(bool isFix)
|
||||
void setFixFlag(bool isFix) override
|
||||
{
|
||||
m_chunkManager->setFixFlag(isFix);
|
||||
};
|
||||
int checkFixLastDictChunk()
|
||||
int checkFixLastDictChunk() override
|
||||
{
|
||||
return m_chunkManager->checkFixLastDictChunk(m_dctnryOID, m_dbRoot, m_partition, m_segment);
|
||||
};
|
||||
@ -127,7 +128,7 @@ class DctnryCompress1 : public Dctnry
|
||||
/**
|
||||
* @brief virtual method in FileOp
|
||||
*/
|
||||
void setTransId(const TxnID& transId)
|
||||
void setTransId(const TxnID& transId) override
|
||||
{
|
||||
Dctnry::setTransId(transId);
|
||||
|
||||
@ -148,7 +149,7 @@ class DctnryCompress1 : public Dctnry
|
||||
/**
|
||||
* @brief virtual method in FileOp
|
||||
*/
|
||||
int updateDctnryExtent(IDBDataFile* pFile, int nBlocks, int64_t lbid);
|
||||
int updateDctnryExtent(IDBDataFile* pFile, int nBlocks, int64_t lbid) override;
|
||||
|
||||
/**
|
||||
* @brief convert lbid to fbo
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <cstdint>
|
||||
#include "we_type.h"
|
||||
#include "brmtypes.h"
|
||||
#include <map>
|
||||
@ -82,7 +82,7 @@ class TableMetaData
|
||||
private:
|
||||
/** Constuctors */
|
||||
explicit TableMetaData();
|
||||
explicit TableMetaData(const TableMetaData& rhs);
|
||||
TableMetaData(const TableMetaData& rhs);
|
||||
~TableMetaData();
|
||||
static boost::mutex map_mutex;
|
||||
static TableMetaDataMap fTableMetaDataMap;
|
||||
@ -93,4 +93,3 @@ class TableMetaData
|
||||
} // namespace WriteEngine
|
||||
|
||||
#undef EXPORT
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
/** @file */
|
||||
|
||||
#pragma once
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
|
||||
// the header file for fd
|
||||
@ -66,10 +66,8 @@ struct TxnLBIDRec
|
||||
std::vector<BRM::LBID_t> m_LBIDs;
|
||||
std::vector<execplan::CalpontSystemCatalog::ColDataType> m_ColDataTypes;
|
||||
|
||||
TxnLBIDRec(){};
|
||||
~TxnLBIDRec()
|
||||
{
|
||||
}
|
||||
TxnLBIDRec() = default;
|
||||
~TxnLBIDRec() = default;
|
||||
void AddLBID(BRM::LBID_t lbid, const execplan::CalpontSystemCatalog::ColDataType& colDataType)
|
||||
{
|
||||
if (m_LBIDSet.insert(lbid).second)
|
||||
@ -92,7 +90,7 @@ struct ColSplitMaxMinInfo
|
||||
ColSplitMaxMinInfo(execplan::CalpontSystemCatalog::ColDataType colDataType, int colWidth)
|
||||
: fSplitMaxMinInfo{ExtCPInfo(colDataType, colWidth), ExtCPInfo(colDataType, colWidth)}
|
||||
{
|
||||
fSplitMaxMinInfoPtrs[0] = fSplitMaxMinInfoPtrs[1] = NULL; // disable by default.
|
||||
fSplitMaxMinInfoPtrs[0] = fSplitMaxMinInfoPtrs[1] = nullptr; // disable by default.
|
||||
}
|
||||
};
|
||||
|
||||
@ -246,8 +244,7 @@ class WriteEngineWrapper : public WEObj
|
||||
*/
|
||||
EXPORT int deleteRow(const TxnID& txnid, const std::vector<CSCTypesList>& colExtentsColType,
|
||||
std::vector<ColStructList>& colExtentsStruct, std::vector<void*>& colOldValueList,
|
||||
std::vector<RIDList>& ridLists, const int32_t tableOid,
|
||||
bool hasAUXCol = false);
|
||||
std::vector<RIDList>& ridLists, const int32_t tableOid, bool hasAUXCol = false);
|
||||
|
||||
/**
|
||||
* @brief Delete a list of rows from a table
|
||||
@ -702,7 +699,7 @@ class WriteEngineWrapper : public WEObj
|
||||
int writeColumnRec(const TxnID& txnid, const CSCTypesList& cscColTypes, const ColStructList& colStructList,
|
||||
ColValueList& colValueList, RID* rowIdArray, const ColStructList& newColStructList,
|
||||
ColValueList& newColValueList, const int32_t tableOid, bool useTmpSuffix,
|
||||
bool versioning = true, ColSplitMaxMinInfoList* maxMins = NULL);
|
||||
bool versioning = true, ColSplitMaxMinInfoList* maxMins = nullptr);
|
||||
|
||||
int writeColumnRecBinary(const TxnID& txnid, const ColStructList& colStructList,
|
||||
std::vector<uint64_t>& colValueList, RID* rowIdArray,
|
||||
@ -714,14 +711,14 @@ class WriteEngineWrapper : public WEObj
|
||||
const ColStructList& colStructList, const ColValueList& colValueList,
|
||||
std::vector<void*>& colOldValueList, const RIDList& ridList,
|
||||
const int32_t tableOid, bool convertStructFlag = true,
|
||||
ColTupleList::size_type nRows = 0, std::vector<ExtCPInfo*>* cpInfos = NULL,
|
||||
ColTupleList::size_type nRows = 0, std::vector<ExtCPInfo*>* cpInfos = nullptr,
|
||||
bool hasAUXCol = false);
|
||||
|
||||
// For update column from column to use
|
||||
int writeColumnRecords(const TxnID& txnid, const CSCTypesList& cscColTypeList,
|
||||
std::vector<ColStruct>& colStructList, ColValueList& colValueList,
|
||||
const RIDList& ridLists, const int32_t tableOid, bool versioning = true,
|
||||
std::vector<ExtCPInfo*>* cpInfos = NULL);
|
||||
std::vector<ExtCPInfo*>* cpInfos = nullptr);
|
||||
|
||||
/**
|
||||
* @brief util method to convert rowid to a column file
|
||||
@ -738,7 +735,7 @@ class WriteEngineWrapper : public WEObj
|
||||
// txn so that we don't waste time marking the same extent as invalid. This
|
||||
// list should be trimmed if it gets too big.
|
||||
int AddLBIDtoList(const TxnID txnid, const ColStruct& colStruct, const int fbo,
|
||||
ExtCPInfo* cpInfo = NULL // provide CPInfo pointer if you want max/min updated.
|
||||
ExtCPInfo* cpInfo = nullptr // provide CPInfo pointer if you want max/min updated.
|
||||
);
|
||||
|
||||
// Get CPInfo for given starting LBID and column description structure.
|
||||
|
Reference in New Issue
Block a user