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
@ -66,7 +66,7 @@ class BulkLoad : public FileOp
|
||||
/**
|
||||
* @brief BulkLoad destructor
|
||||
*/
|
||||
EXPORT ~BulkLoad();
|
||||
EXPORT ~BulkLoad() override;
|
||||
|
||||
/**
|
||||
* @brief Load job information
|
||||
@ -523,12 +523,12 @@ inline void BulkLoad::setUsername(const std::string& username)
|
||||
|
||||
inline void BulkLoad::startTimer()
|
||||
{
|
||||
gettimeofday(&fStartTime, 0);
|
||||
gettimeofday(&fStartTime, nullptr);
|
||||
}
|
||||
|
||||
inline void BulkLoad::stopTimer()
|
||||
{
|
||||
gettimeofday(&fEndTime, 0);
|
||||
gettimeofday(&fEndTime, nullptr);
|
||||
fTotalTime = (fEndTime.tv_sec + (fEndTime.tv_usec / 1000000.0)) -
|
||||
(fStartTime.tv_sec + (fStartTime.tv_usec / 1000000.0));
|
||||
}
|
||||
|
@ -54,19 +54,19 @@ class ColumnBufferCompressed : public ColumnBuffer
|
||||
|
||||
/** @brief default Destructor
|
||||
*/
|
||||
virtual ~ColumnBufferCompressed();
|
||||
~ColumnBufferCompressed() override;
|
||||
|
||||
/** @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);
|
||||
int finishFile(bool bTruncFile) override;
|
||||
|
||||
/** @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);
|
||||
int resetToBeCompressedColBuf(long long& startFileOffset) override;
|
||||
|
||||
/** @brief file mutator
|
||||
*
|
||||
@ -74,7 +74,7 @@ class ColumnBufferCompressed : public ColumnBuffer
|
||||
* @param startHwm Starting HWM for cFile
|
||||
* @param hdrs Headers with ptr information.
|
||||
*/
|
||||
virtual int setDbFile(IDBDataFile* const cFile, HWM startHwm, const char* hdrs);
|
||||
int setDbFile(IDBDataFile* const cFile, HWM startHwm, const char* hdrs) override;
|
||||
|
||||
/** @brief Write data to FILE
|
||||
*
|
||||
@ -83,7 +83,7 @@ class ColumnBufferCompressed : public ColumnBuffer
|
||||
* @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);
|
||||
int writeToFile(int startOffset, int writeSize, bool fillUpWEmpties = false) override;
|
||||
|
||||
private:
|
||||
// Disable copy constructor and assignment operator by declaring and
|
||||
|
@ -260,9 +260,9 @@ class ColumnBufferManagerDctnry : public ColumnBufferManager
|
||||
{
|
||||
public:
|
||||
ColumnBufferManagerDctnry(ColumnInfo* pColInfo, int colWidth, Log* logger, int compressionType);
|
||||
virtual ~ColumnBufferManagerDctnry();
|
||||
~ColumnBufferManagerDctnry() override;
|
||||
|
||||
virtual int rowsExtentCheck(int nRows, int& nRows2);
|
||||
int rowsExtentCheck(int nRows, int& nRows2) override;
|
||||
using ColumnBufferManager::writeToFileExtentCheck;
|
||||
virtual int writeToFileExtentCheck(uint32_t startOffset, uint32_t writeSize);
|
||||
};
|
||||
|
@ -136,12 +136,8 @@ struct uint64Hasher
|
||||
class ColExtInfBase
|
||||
{
|
||||
public:
|
||||
ColExtInfBase()
|
||||
{
|
||||
}
|
||||
virtual ~ColExtInfBase()
|
||||
{
|
||||
}
|
||||
ColExtInfBase() = default;
|
||||
virtual ~ColExtInfBase() = default;
|
||||
|
||||
virtual void addFirstEntry(RID lastInputRow, BRM::LBID_t lbid, bool bIsNewExtent)
|
||||
{
|
||||
@ -192,9 +188,7 @@ class ColExtInf : public ColExtInfBase
|
||||
ColExtInf(OID oid, Log* logger) : fColOid(oid), fLog(logger)
|
||||
{
|
||||
}
|
||||
virtual ~ColExtInf()
|
||||
{
|
||||
}
|
||||
~ColExtInf() override = default;
|
||||
|
||||
/** @brief Add an entry for first extent, for the specified Row and LBID.
|
||||
* @param lastInputRow Last input Row for old extent we are adding data to
|
||||
@ -202,7 +196,7 @@ class ColExtInf : public ColExtInfBase
|
||||
* @param bIsNewExtent Treat as new or existing extent when CP min/max is
|
||||
* sent to BRM
|
||||
*/
|
||||
virtual void addFirstEntry(RID lastInputRow, BRM::LBID_t lbid, bool bIsNewExtent);
|
||||
void addFirstEntry(RID lastInputRow, BRM::LBID_t lbid, bool bIsNewExtent) override;
|
||||
|
||||
/** @brief Add or update an entry for the specified Row and its min/max val.
|
||||
* If new extent, LBID will be added later when extent is allocated.
|
||||
@ -213,31 +207,31 @@ class ColExtInf : public ColExtInfBase
|
||||
template <typename T>
|
||||
void addOrUpdateEntryTemplate(RID lastInputRow, T minVal, T maxVal, ColDataType colDataType, int width);
|
||||
|
||||
virtual void addOrUpdateEntry(RID lastInputRow, int64_t minVal, int64_t maxVal, ColDataType colDataType,
|
||||
int width)
|
||||
void addOrUpdateEntry(RID lastInputRow, int64_t minVal, int64_t maxVal, ColDataType colDataType,
|
||||
int width) override
|
||||
{
|
||||
addOrUpdateEntryTemplate(lastInputRow, minVal, maxVal, colDataType, width);
|
||||
}
|
||||
|
||||
virtual void addOrUpdateEntry(RID lastInputRow, int128_t minVal, int128_t maxVal, ColDataType colDataType,
|
||||
int width)
|
||||
void addOrUpdateEntry(RID lastInputRow, int128_t minVal, int128_t maxVal, ColDataType colDataType,
|
||||
int width) override
|
||||
{
|
||||
addOrUpdateEntryTemplate(lastInputRow, minVal, maxVal, colDataType, width);
|
||||
}
|
||||
|
||||
/** @brief Send updated Casual Partition (CP) info to BRM.
|
||||
*/
|
||||
virtual void getCPInfoForBRM(JobColumn column, BRMReporter& brmReporter);
|
||||
void getCPInfoForBRM(JobColumn column, BRMReporter& brmReporter) override;
|
||||
|
||||
/** @brief Debug print function.
|
||||
*/
|
||||
virtual void print(const JobColumn& column);
|
||||
void print(const JobColumn& column) override;
|
||||
|
||||
/** @brief Add extent's LBID to the oldest entry that is awaiting an LBID
|
||||
* @param startLbid Starting LBID for a pending extent.
|
||||
* @return NO_ERROR upon success; else error if extent entry not found
|
||||
*/
|
||||
virtual int updateEntryLbid(BRM::LBID_t startLbid);
|
||||
int updateEntryLbid(BRM::LBID_t startLbid) override;
|
||||
|
||||
private:
|
||||
OID fColOid; // Column OID for the relevant extents
|
||||
|
@ -44,16 +44,15 @@ class ColumnOpBulk : public ColumnOp
|
||||
public:
|
||||
ColumnOpBulk();
|
||||
ColumnOpBulk(Log* logger, int compressionType);
|
||||
virtual ~ColumnOpBulk();
|
||||
~ColumnOpBulk() override;
|
||||
|
||||
virtual bool abbreviatedExtent(IDBDataFile*, int) const;
|
||||
virtual int blocksInFile(IDBDataFile*) const;
|
||||
virtual IDBDataFile* openFile(const WriteEngine::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;
|
||||
virtual int readBlock(IDBDataFile*, unsigned char*, const uint64_t);
|
||||
virtual int saveBlock(IDBDataFile*, const unsigned char*, const uint64_t);
|
||||
bool abbreviatedExtent(IDBDataFile*, int) const override;
|
||||
int blocksInFile(IDBDataFile*) const override;
|
||||
IDBDataFile* openFile(const WriteEngine::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 override;
|
||||
int readBlock(IDBDataFile*, unsigned char*, const uint64_t) override;
|
||||
int saveBlock(IDBDataFile*, const unsigned char*, const uint64_t) override;
|
||||
};
|
||||
|
||||
} // namespace WriteEngine
|
||||
|
@ -97,9 +97,9 @@ class ColumnAutoIncJob : public ColumnAutoInc
|
||||
{
|
||||
public:
|
||||
explicit ColumnAutoIncJob(Log* logger);
|
||||
virtual ~ColumnAutoIncJob();
|
||||
~ColumnAutoIncJob() override;
|
||||
|
||||
virtual int reserveNextRange(uint32_t autoIncCount, uint64_t& nextValue);
|
||||
int reserveNextRange(uint32_t autoIncCount, uint64_t& nextValue) override;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -115,9 +115,9 @@ class ColumnAutoIncIncremental : public ColumnAutoInc
|
||||
{
|
||||
public:
|
||||
explicit ColumnAutoIncIncremental(Log* logger);
|
||||
virtual ~ColumnAutoIncIncremental();
|
||||
~ColumnAutoIncIncremental() override;
|
||||
|
||||
virtual int reserveNextRange(uint32_t autoIncCount, uint64_t& nextValue);
|
||||
int reserveNextRange(uint32_t autoIncCount, uint64_t& nextValue) override;
|
||||
};
|
||||
|
||||
} // namespace WriteEngine
|
||||
|
@ -184,7 +184,7 @@ class ColumnInfo : public WeUIDGID
|
||||
|
||||
/** @brief Destructor
|
||||
*/
|
||||
virtual ~ColumnInfo();
|
||||
~ColumnInfo() override;
|
||||
|
||||
/** @brief Returns last input Row num in current "logical" extent; used
|
||||
* to track min/max value per extent, as the data is parsed. 0-based
|
||||
|
@ -50,14 +50,14 @@ class ColumnInfoCompressed : public ColumnInfo
|
||||
|
||||
/** @brief Destructor
|
||||
*/
|
||||
virtual ~ColumnInfoCompressed();
|
||||
~ColumnInfoCompressed() override;
|
||||
|
||||
/** @brief Close the current Column file.
|
||||
* @param bCompletedExtent are we completing an extent
|
||||
* @param bAbort indicates if job is aborting and file should be
|
||||
* closed without doing extra work: flushing buffer, etc.
|
||||
*/
|
||||
virtual int closeColumnFile(bool bCompletingExtent, bool bAbort);
|
||||
int closeColumnFile(bool bCompletingExtent, bool bAbort) override;
|
||||
|
||||
/** @brief Truncate specified dictionary file. Only applies if compressed.
|
||||
* @param dctnryOid Dictionary store OID
|
||||
@ -65,21 +65,21 @@ class ColumnInfoCompressed : public ColumnInfo
|
||||
* @param pNum Partition number of relevant dictionary store segment file.
|
||||
* @param sNum Segment number of relevant dictionary store segment file.
|
||||
*/
|
||||
virtual int truncateDctnryStore(OID dctnryOid, uint16_t root, uint32_t pNum, uint16_t sNum) const;
|
||||
int truncateDctnryStore(OID dctnryOid, uint16_t root, uint32_t pNum, uint16_t sNum) const override;
|
||||
|
||||
private:
|
||||
virtual int resetFileOffsetsNewExtent(const char* hdr);
|
||||
int resetFileOffsetsNewExtent(const char* hdr) override;
|
||||
|
||||
// Prepare initial compressed column seg file for importing of data.
|
||||
// oldHWM - Current HWM prior to initial block skipping. This is only
|
||||
// used for abbreviated extents, to detect when block skipping has
|
||||
// caused us to require a full expanded extent.
|
||||
// newHWM - Starting point for adding data after initial blockskipping
|
||||
virtual int setupInitialColumnFile(HWM oldHWM, HWM newHWM);
|
||||
int setupInitialColumnFile(HWM oldHWM, HWM newHWM) override;
|
||||
|
||||
virtual int saveDctnryStoreHWMChunk(bool& needBackup);
|
||||
virtual int extendColumnOldExtent(uint16_t dbRootNext, uint32_t partitionNext, uint16_t segmentNext,
|
||||
HWM hwmNext);
|
||||
int saveDctnryStoreHWMChunk(bool& needBackup) override;
|
||||
int extendColumnOldExtent(uint16_t dbRootNext, uint32_t partitionNext, uint16_t segmentNext,
|
||||
HWM hwmNext) override;
|
||||
|
||||
RBMetaWriter* fRBMetaWriter;
|
||||
FileOp fTruncateDctnryFileOp; // Used to truncate dctnry store file
|
||||
|
@ -217,7 +217,7 @@ class TableInfo : public WeUIDGID
|
||||
|
||||
/** @brief Default destructor
|
||||
*/
|
||||
~TableInfo();
|
||||
~TableInfo() override;
|
||||
|
||||
/** @brief Acquire the DB table lock for this table
|
||||
*/
|
||||
|
@ -38,9 +38,9 @@ class TempXMLGenData : public XMLGenData
|
||||
public:
|
||||
TempXMLGenData(const std::string& jobId, const std::string& schema, const std::string& table);
|
||||
|
||||
virtual ~TempXMLGenData();
|
||||
~TempXMLGenData() override;
|
||||
|
||||
virtual void print(std::ostream& os) const;
|
||||
void print(std::ostream& os) const override;
|
||||
|
||||
private:
|
||||
TempXMLGenData(const TempXMLGenData&); // disable default copy ctor
|
||||
|
Reference in New Issue
Block a user