1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

chore(codestyle): mark virtual methods as override

This commit is contained in:
Aleksei Antipovskii
2024-09-12 12:27:02 +02:00
committed by Leonid Fedorov
parent ad80ab40aa
commit 0ab03c7258
303 changed files with 4085 additions and 4886 deletions

View File

@ -94,7 +94,7 @@ class AggregateColumn : public ReturnedColumn
/**
* ctor
*/
AggregateColumn(const uint32_t sessionID);
explicit AggregateColumn(const uint32_t sessionID);
/**
* ctor
@ -109,9 +109,7 @@ class AggregateColumn : public ReturnedColumn
/**
* Destructors
*/
virtual ~AggregateColumn()
{
}
~AggregateColumn() override = default;
/**
* Accessor Methods
@ -167,7 +165,7 @@ class AggregateColumn : public ReturnedColumn
*
* deep copy of this pointer and return the copy
*/
inline virtual AggregateColumn* clone() const override
inline AggregateColumn* clone() const override
{
return new AggregateColumn(*this);
}
@ -190,14 +188,14 @@ class AggregateColumn : public ReturnedColumn
/**
* ASC flag
*/
inline virtual bool asc() const override
inline bool asc() const override
{
return fAsc;
}
/**
* ASC flag
*/
inline virtual void asc(const bool asc) override
inline void asc(const bool asc) override
{
fAsc = asc;
}
@ -205,7 +203,7 @@ class AggregateColumn : public ReturnedColumn
/**
* fData: SQL representation of this object
*/
virtual const std::string data() const override
const std::string data() const override
{
return fData;
}
@ -221,24 +219,24 @@ class AggregateColumn : public ReturnedColumn
/**
* Overloaded stream operator
*/
virtual const std::string toString() const override;
virtual std::string toCppCode(IncludeSet& includes) const override;
const std::string toString() const override;
std::string toCppCode(IncludeSet& includes) const override;
/**
* Serialize interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
void serialize(messageqcpp::ByteStream&) const override;
/**
* Serialize interface
*/
virtual void unserialize(messageqcpp::ByteStream&) override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -253,7 +251,7 @@ class AggregateColumn : public ReturnedColumn
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -309,8 +307,8 @@ class AggregateColumn : public ReturnedColumn
static AggOp agname2num(const std::string&);
using ReturnedColumn::hasAggregate;
virtual bool hasAggregate() override;
virtual bool hasWindowFunc() override
bool hasAggregate() override;
bool hasWindowFunc() override
{
return false;
}
@ -357,7 +355,7 @@ class AggregateColumn : public ReturnedColumn
/**
* F&E
*/
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
{
bool localIsNull = false;
evaluate(row, localIsNull);
@ -368,7 +366,7 @@ class AggregateColumn : public ReturnedColumn
/**
* F&E
*/
virtual int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getIntVal();
@ -377,7 +375,7 @@ class AggregateColumn : public ReturnedColumn
/**
* F&E
*/
virtual uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override
uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getUintVal();
@ -386,7 +384,7 @@ class AggregateColumn : public ReturnedColumn
/**
* F&E
*/
virtual float getFloatVal(rowgroup::Row& row, bool& isNull) override
float getFloatVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getFloatVal();
@ -395,7 +393,7 @@ class AggregateColumn : public ReturnedColumn
/**
* F&E
*/
virtual double getDoubleVal(rowgroup::Row& row, bool& isNull) override
double getDoubleVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getDoubleVal();
@ -404,7 +402,7 @@ class AggregateColumn : public ReturnedColumn
/**
* F&E
*/
virtual long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override
long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getLongDoubleVal();
@ -413,7 +411,7 @@ class AggregateColumn : public ReturnedColumn
/**
* F&E
*/
virtual IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override
IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getDecimalVal();
@ -421,7 +419,7 @@ class AggregateColumn : public ReturnedColumn
/**
* F&E
*/
virtual int32_t getDateIntVal(rowgroup::Row& row, bool& isNull) override
int32_t getDateIntVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getDateIntVal();
@ -429,7 +427,7 @@ class AggregateColumn : public ReturnedColumn
/**
* F&E
*/
virtual int64_t getTimeIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getTimeIntVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getTimeIntVal();
@ -437,7 +435,7 @@ class AggregateColumn : public ReturnedColumn
/**
* F&E
*/
virtual int64_t getDatetimeIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getDatetimeIntVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getDatetimeIntVal();
@ -445,7 +443,7 @@ class AggregateColumn : public ReturnedColumn
/**
* F&E
*/
virtual int64_t getTimestampIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getTimestampIntVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getTimestampIntVal();

View File

@ -51,7 +51,7 @@ class ArithmeticColumn : public ReturnedColumn
ArithmeticColumn();
ArithmeticColumn(const std::string& sql, const uint32_t sessionID = 0);
ArithmeticColumn(const ArithmeticColumn& rhs, const uint32_t sessionID = 0);
virtual ~ArithmeticColumn();
~ArithmeticColumn() override;
inline ParseTree* expression() const
{
@ -102,7 +102,7 @@ class ArithmeticColumn : public ReturnedColumn
/**
* get SQL representation of this object
*/
virtual const std::string data() const override
const std::string data() const override
{
return fData;
}
@ -110,7 +110,7 @@ class ArithmeticColumn : public ReturnedColumn
/**
* set SQL representation of this object
*/
virtual void data(const std::string data) override
void data(const std::string data) override
{
fData = data;
}
@ -118,13 +118,13 @@ class ArithmeticColumn : public ReturnedColumn
/**
* virtual stream method
*/
virtual const std::string toString() const override;
const std::string toString() const override;
/** return a copy of this pointer
*
* deep copy of this pointer and return the copy
*/
inline virtual ArithmeticColumn* clone() const override
inline ArithmeticColumn* clone() const override
{
return new ArithmeticColumn(*this);
}
@ -132,15 +132,15 @@ class ArithmeticColumn : public ReturnedColumn
/**
* The serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -154,7 +154,7 @@ class ArithmeticColumn : public ReturnedColumn
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -164,16 +164,16 @@ class ArithmeticColumn : public ReturnedColumn
bool operator!=(const ArithmeticColumn& t) const;
using ReturnedColumn::hasAggregate;
virtual bool hasAggregate() override;
virtual bool hasWindowFunc() override;
bool hasAggregate() override;
bool hasWindowFunc() override;
virtual void setDerivedTable() override;
virtual void replaceRealCol(std::vector<SRCP>&) override;
virtual const std::vector<SimpleColumn*>& simpleColumnList() const override
void setDerivedTable() override;
void replaceRealCol(std::vector<SRCP>&) override;
const std::vector<SimpleColumn*>& simpleColumnList() const override
{
return fSimpleColumnList;
}
virtual void setSimpleColumnList() override;
void setSimpleColumnList() override;
/**
* Return the table that the column arguments belong to.
@ -181,13 +181,13 @@ class ArithmeticColumn : public ReturnedColumn
* @return tablename, if all arguments belong to one table
* empty string "", if multiple tables are involved in this func
*/
virtual bool singleTable(CalpontSystemCatalog::TableAliasName& tan) override;
bool singleTable(CalpontSystemCatalog::TableAliasName& tan) override;
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
private:
std::string fTableAlias; // table alias for this column
bool fAsc = false; // asc flag for order by column
bool fAsc = false; // asc flag for order by column
std::string fData;
/** build expression tree
@ -211,62 +211,62 @@ class ArithmeticColumn : public ReturnedColumn
* F&E framework *
***********************************************************/
public:
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
{
return fExpression->getStrVal(row, isNull);
}
virtual int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
{
return fExpression->getIntVal(row, isNull);
}
virtual uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override
uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override
{
return fExpression->getUintVal(row, isNull);
}
virtual float getFloatVal(rowgroup::Row& row, bool& isNull) override
float getFloatVal(rowgroup::Row& row, bool& isNull) override
{
return fExpression->getFloatVal(row, isNull);
}
virtual double getDoubleVal(rowgroup::Row& row, bool& isNull) override
double getDoubleVal(rowgroup::Row& row, bool& isNull) override
{
return fExpression->getDoubleVal(row, isNull);
}
virtual long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override
long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override
{
return fExpression->getLongDoubleVal(row, isNull);
}
virtual IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override
IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override
{
return fExpression->getDecimalVal(row, isNull);
}
virtual int32_t getDateIntVal(rowgroup::Row& row, bool& isNull) override
int32_t getDateIntVal(rowgroup::Row& row, bool& isNull) override
{
return fExpression->getDateIntVal(row, isNull);
}
virtual int64_t getDatetimeIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getDatetimeIntVal(rowgroup::Row& row, bool& isNull) override
{
return fExpression->getDatetimeIntVal(row, isNull);
}
virtual int64_t getTimestampIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getTimestampIntVal(rowgroup::Row& row, bool& isNull) override
{
return fExpression->getTimestampIntVal(row, isNull);
}
virtual int64_t getTimeIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getTimeIntVal(rowgroup::Row& row, bool& isNull) override
{
return fExpression->getTimeIntVal(row, isNull);
}
virtual bool getBoolVal(rowgroup::Row& row, bool& isNull) override
bool getBoolVal(rowgroup::Row& row, bool& isNull) override
{
return fExpression->getBoolVal(row, isNull);
}

View File

@ -46,16 +46,16 @@ class ArithmeticOperator : public Operator
public:
ArithmeticOperator();
ArithmeticOperator(const std::string& operatorName);
explicit ArithmeticOperator(const std::string& operatorName);
ArithmeticOperator(const ArithmeticOperator& rhs);
virtual ~ArithmeticOperator();
~ArithmeticOperator() override;
/** return a copy of this pointer
*
* deep copy of this pointer and return the copy
*/
inline virtual ArithmeticOperator* clone() const override
inline ArithmeticOperator* clone() const override
{
return new ArithmeticOperator(*this);
}
@ -72,15 +72,15 @@ class ArithmeticOperator : public Operator
/**
* The serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -94,7 +94,7 @@ class ArithmeticOperator : public Operator
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -107,11 +107,11 @@ class ArithmeticOperator : public Operator
* F&E framework *
***********************************************************/
using Operator::evaluate;
inline virtual void evaluate(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override;
inline void evaluate(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override;
using Operator::getStrVal;
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull, ParseTree* lop,
ParseTree* rop) override
const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull, ParseTree* lop,
ParseTree* rop) override
{
bool localIsNull = false;
evaluate(row, localIsNull, lop, rop);
@ -119,38 +119,37 @@ class ArithmeticOperator : public Operator
return localIsNull ? fResult.strVal.dropString() : TreeNode::getStrVal(fTimeZone);
}
using Operator::getIntVal;
virtual int64_t getIntVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
int64_t getIntVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
{
evaluate(row, isNull, lop, rop);
return TreeNode::getIntVal();
}
using Operator::getUintVal;
virtual uint64_t getUintVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
uint64_t getUintVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
{
evaluate(row, isNull, lop, rop);
return TreeNode::getUintVal();
}
using Operator::getFloatVal;
virtual float getFloatVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
float getFloatVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
{
evaluate(row, isNull, lop, rop);
return TreeNode::getFloatVal();
}
using Operator::getDoubleVal;
virtual double getDoubleVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
double getDoubleVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
{
evaluate(row, isNull, lop, rop);
return TreeNode::getDoubleVal();
}
using Operator::getLongDoubleVal;
virtual long double getLongDoubleVal(rowgroup::Row& row, bool& isNull, ParseTree* lop,
ParseTree* rop) override
long double getLongDoubleVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
{
evaluate(row, isNull, lop, rop);
return TreeNode::getLongDoubleVal();
}
using Operator::getDecimalVal;
virtual IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
{
evaluate(row, isNull, lop, rop);
@ -169,32 +168,31 @@ class ArithmeticOperator : public Operator
return TreeNode::getDecimalVal();
}
using Operator::getDateIntVal;
virtual int32_t getDateIntVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
int32_t getDateIntVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
{
evaluate(row, isNull, lop, rop);
return TreeNode::getDateIntVal();
}
using Operator::getDatetimeIntVal;
virtual int64_t getDatetimeIntVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
int64_t getDatetimeIntVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
{
evaluate(row, isNull, lop, rop);
return TreeNode::getDatetimeIntVal();
}
using Operator::getTimestampIntVal;
virtual int64_t getTimestampIntVal(rowgroup::Row& row, bool& isNull, ParseTree* lop,
ParseTree* rop) override
int64_t getTimestampIntVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
{
evaluate(row, isNull, lop, rop);
return TreeNode::getTimestampIntVal();
}
using Operator::getTimeIntVal;
virtual int64_t getTimeIntVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
int64_t getTimeIntVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
{
evaluate(row, isNull, lop, rop);
return TreeNode::getTimeIntVal();
}
using Operator::getBoolVal;
virtual bool getBoolVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
bool getBoolVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
{
evaluate(row, isNull, lop, rop);
return TreeNode::getBoolVal();
@ -209,7 +207,7 @@ class ArithmeticOperator : public Operator
fDecimalOverflowCheck = check;
}
inline virtual std::string toCppCode(IncludeSet& includes) const override
inline std::string toCppCode(IncludeSet& includes) const override
{
includes.insert("arithmeticoperator.h");
std::stringstream ss;

View File

@ -23,6 +23,6 @@
// # of bytes in a block
const uint64_t BLOCK_SIZE = 8192;
// lobgical_block_rids is the # of rows 1-byter-column in a block
// logical_block_rids is the # of rows 1-byter-column in a block
// its value is the same as block_size, but different unit
const uint64_t LOGICAL_BLOCK_RIDS = BLOCK_SIZE;

View File

@ -25,13 +25,13 @@
using namespace std;
#include <boost/uuid/uuid_io.hpp>
#include <utility>
#include "bytestream.h"
using namespace messageqcpp;
#include "calpontselectexecutionplan.h"
#include "objectreader.h"
#include "filter.h"
#include "returnedcolumn.h"
#include "simplecolumn.h"
#include "querystats.h"
@ -63,10 +63,10 @@ CalpontSelectExecutionPlan::ColumnMap CalpontSelectExecutionPlan::fColMap;
/**
* Constructors/Destructors
*/
CalpontSelectExecutionPlan::CalpontSelectExecutionPlan(const int location)
CalpontSelectExecutionPlan::CalpontSelectExecutionPlan(int location)
: fLocalQuery(GLOBAL_QUERY)
, fFilters(0)
, fHaving(0)
, fFilters(nullptr)
, fHaving(nullptr)
, fLocation(location)
, fDependent(false)
, fTxnID(-1)
@ -98,17 +98,18 @@ CalpontSelectExecutionPlan::CalpontSelectExecutionPlan(const int location)
fUuid = QueryTeleClient::genUUID();
}
CalpontSelectExecutionPlan::CalpontSelectExecutionPlan(
const ReturnedColumnList& returnedCols, ParseTree* filters, const SelectList& subSelects,
const GroupByColumnList& groupByCols, ParseTree* having, const OrderByColumnList& orderByCols,
const string alias, const int location, const bool dependent, const bool withRollup)
: fReturnedCols(returnedCols)
CalpontSelectExecutionPlan::CalpontSelectExecutionPlan(ReturnedColumnList returnedCols, ParseTree* filters,
SelectList subSelects, GroupByColumnList groupByCols,
ParseTree* having, OrderByColumnList orderByCols,
string alias, int location, bool dependent,
bool withRollup)
: fReturnedCols(std::move(returnedCols))
, fFilters(filters)
, fSubSelects(subSelects)
, fGroupByCols(groupByCols)
, fSubSelects(std::move(subSelects))
, fGroupByCols(std::move(groupByCols))
, fHaving(having)
, fOrderByCols(orderByCols)
, fTableAlias(alias)
, fOrderByCols(std::move(orderByCols))
, fTableAlias(std::move(alias))
, fLocation(location)
, fDependent(dependent)
, fPriority(querystats::DEFAULT_USER_PRIORITY_LEVEL)
@ -118,23 +119,18 @@ CalpontSelectExecutionPlan::CalpontSelectExecutionPlan(
}
CalpontSelectExecutionPlan::CalpontSelectExecutionPlan(string data)
: fData(data)
, fPriority(querystats::DEFAULT_USER_PRIORITY_LEVEL)
, fWithRollup(false)
: fData(std::move(data)), fPriority(querystats::DEFAULT_USER_PRIORITY_LEVEL), fWithRollup(false)
{
fUuid = QueryTeleClient::genUUID();
}
CalpontSelectExecutionPlan::~CalpontSelectExecutionPlan()
{
if (fFilters != NULL)
delete fFilters;
delete fFilters;
delete fHaving;
if (fHaving != NULL)
delete fHaving;
fFilters = NULL;
fHaving = NULL;
fFilters = nullptr;
fHaving = nullptr;
if (!fDynamicParseTreeVec.empty())
{
@ -145,11 +141,11 @@ CalpontSelectExecutionPlan::~CalpontSelectExecutionPlan()
// 'delete fFilters;' above has already deleted objects pointed
// to by parseTree->left()/right()/data(), so we set the
// pointers to NULL here before calling 'delete parseTree;'
parseTree->left((ParseTree*)(NULL));
parseTree->right((ParseTree*)(NULL));
parseTree->data((TreeNode*)(NULL));
parseTree->left((ParseTree*)(nullptr));
parseTree->right((ParseTree*)(nullptr));
parseTree->data((TreeNode*)(nullptr));
delete parseTree;
parseTree = NULL;
parseTree = nullptr;
}
}
@ -265,7 +261,7 @@ string CalpontSelectExecutionPlan::toString() const
// Filters
output << ">>Filters" << endl;
if (filters() != 0)
if (filters() != nullptr)
filters()->walk(ParseTree::print, output);
else
output << "empty filter tree" << endl;
@ -282,7 +278,7 @@ string CalpontSelectExecutionPlan::toString() const
}
// Having
if (having() != 0)
if (having() != nullptr)
{
output << ">>Having" << endl;
having()->walk(ParseTree::print, output);
@ -496,16 +492,16 @@ void CalpontSelectExecutionPlan::unserialize(messageqcpp::ByteStream& b)
fDerivedTableList.clear();
fSelectSubList.clear();
if (fFilters != 0)
if (fFilters != nullptr)
{
delete fFilters;
fFilters = 0;
fFilters = nullptr;
}
if (fHaving != 0)
if (fHaving != nullptr)
{
delete fHaving;
fHaving = 0;
fHaving = nullptr;
}
if (!fDynamicParseTreeVec.empty())
@ -517,11 +513,11 @@ void CalpontSelectExecutionPlan::unserialize(messageqcpp::ByteStream& b)
// 'delete fFilters;' above has already deleted objects pointed
// to by parseTree->left()/right()/data(), so we set the
// pointers to NULL here before calling 'delete parseTree;'
parseTree->left((ParseTree*)(NULL));
parseTree->right((ParseTree*)(NULL));
parseTree->data((TreeNode*)(NULL));
parseTree->left((ParseTree*)(nullptr));
parseTree->right((ParseTree*)(nullptr));
parseTree->data((TreeNode*)(nullptr));
delete parseTree;
parseTree = NULL;
parseTree = nullptr;
}
}
@ -699,12 +695,12 @@ bool CalpontSelectExecutionPlan::operator==(const CalpontSelectExecutionPlan& t)
return false;
// fFilters
if (fFilters != NULL && t.fFilters != NULL)
if (fFilters != nullptr && t.fFilters != nullptr)
{
if (*fFilters != *t.fFilters)
return false;
}
else if (fFilters != NULL || t.fFilters != NULL)
else if (fFilters != nullptr || t.fFilters != nullptr)
return false;
// fSubSelects
@ -725,12 +721,12 @@ bool CalpontSelectExecutionPlan::operator==(const CalpontSelectExecutionPlan& t)
return false;
// fHaving
if (fHaving != NULL && t.fHaving != NULL)
if (fHaving != nullptr && t.fHaving != nullptr)
{
if (*fHaving != *t.fHaving)
return false;
}
else if (fHaving != NULL || t.fHaving != NULL)
else if (fHaving != nullptr || t.fHaving != nullptr)
return false;
// fOrderByCols
@ -795,7 +791,7 @@ bool CalpontSelectExecutionPlan::operator==(const CalpontExecutionPlan* t) const
ac = dynamic_cast<const CalpontSelectExecutionPlan*>(t);
if (ac == NULL)
if (ac == nullptr)
return false;
return *this == *ac;

View File

@ -146,19 +146,18 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
/**
* Constructors
*/
CalpontSelectExecutionPlan(const int location = MAIN);
explicit CalpontSelectExecutionPlan(int location = MAIN);
CalpontSelectExecutionPlan(const ReturnedColumnList& returnedCols, ParseTree* filters,
const SelectList& subSelects, const GroupByColumnList& groupByCols,
ParseTree* having, const OrderByColumnList& orderByCols, const std::string alias,
const int location, const bool dependent, const bool withRollup);
CalpontSelectExecutionPlan(ReturnedColumnList returnedCols, ParseTree* filters, SelectList subSelects,
GroupByColumnList groupByCols, ParseTree* having, OrderByColumnList orderByCols,
std::string alias, int location, bool dependent, bool withRollup);
CalpontSelectExecutionPlan(const std::string data);
explicit CalpontSelectExecutionPlan(std::string data);
/**
* Destructors
*/
virtual ~CalpontSelectExecutionPlan();
~CalpontSelectExecutionPlan() override;
/**
* Access and mutator methods
@ -366,13 +365,13 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
/** sql representation of this select query
*
*/
const std::string data() const
const std::string& data() const
{
return fData;
}
void data(const std::string data)
void data(std::string data)
{
fData = data;
fData = std::move(data);
}
/** session id
@ -679,7 +678,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
{
fDJSSmallSideLimit = l;
}
uint64_t djsSmallSideLimit()
uint64_t djsSmallSideLimit() const
{
return fDJSSmallSideLimit;
}
@ -688,7 +687,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
{
fDJSLargeSideLimit = l;
}
uint64_t djsLargeSideLimit()
uint64_t djsLargeSideLimit() const
{
return fDJSLargeSideLimit;
}
@ -697,7 +696,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
{
fDJSPartitionSize = l;
}
uint64_t djsPartitionSize()
uint64_t djsPartitionSize() const
{
return fDJSPartitionSize;
}
@ -715,7 +714,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
{
fDJSForceRun = b;
}
bool djsForceRun()
bool djsForceRun() const
{
return fDJSForceRun;
}
@ -724,7 +723,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
{
fMaxPmJoinResultCount = value;
}
uint32_t maxPmJoinResultCount()
uint32_t maxPmJoinResultCount() const
{
return fMaxPmJoinResultCount;
}
@ -733,7 +732,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
{
fUMMemLimit = l;
}
int64_t umMemLimit()
int64_t umMemLimit() const
{
return fUMMemLimit;
}
@ -742,7 +741,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
{
fIsDML = b;
}
bool isDML()
bool isDML() const
{
return fIsDML;
}
@ -762,15 +761,15 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
/**
* @note Serialize() assumes that none of the vectors contain NULL pointers.
*/
virtual void serialize(messageqcpp::ByteStream&) const;
virtual void unserialize(messageqcpp::ByteStream&);
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const CalpontExecutionPlan* t) const;
bool operator==(const CalpontExecutionPlan* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -784,7 +783,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const CalpontExecutionPlan* t) const;
bool operator!=(const CalpontExecutionPlan* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -863,7 +862,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
/**
* A tree of Filter objects
*/
ParseTree* fFilters = nullptr;
ParseTree* fFilters{nullptr};
/**
* A list of CalpontExecutionPlan objects
*/
@ -875,7 +874,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
/**
* A tree of having clause condition associated with group by clause
*/
ParseTree* fHaving;
ParseTree* fHaving{nullptr};
/**
* A list of order by columns
*/
@ -955,7 +954,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
// Derived table involved in the query. For derived table optimization
std::vector<SCSEP> fSubSelectList;
boost::uuids::uuid fUuid;
boost::uuids::uuid fUuid{};
/* Disk-based join vars */
uint64_t fDJSSmallSideLimit = 0;

View File

@ -134,15 +134,11 @@ class CalpontSystemCatalog : public datatypes::SystemCatalog
DictOID() : dictOID(0), listOID(0), treeOID(0), compressionType(0)
{
}
DictOID(OID dictOID_, OID listOID_, OID treeOID_, int compressionType_) :
dictOID(dictOID_), listOID(listOID_), treeOID(treeOID_),
compressionType(compressionType_)
{
}
DictOID(const DictOID& rhs)
: dictOID(rhs.dictOID), listOID(rhs.listOID), treeOID(rhs.treeOID), compressionType(rhs.compressionType)
DictOID(OID dictOID_, OID listOID_, OID treeOID_, int compressionType_)
: dictOID(dictOID_), listOID(listOID_), treeOID(treeOID_), compressionType(compressionType_)
{
}
DictOID(const DictOID& rhs) = default;
OID dictOID;
OID listOID;
OID treeOID;
@ -177,7 +173,7 @@ class CalpontSystemCatalog : public datatypes::SystemCatalog
// If we used an unorderedmap<OID, ColumnResult*>, we might improve performance.
// Maybe.
NJLSysDataVector sysDataVec;
NJLSysDataList(){};
NJLSysDataList() = default;
~NJLSysDataList();
NJLSysDataVector::const_iterator begin() const
{
@ -440,9 +436,7 @@ class CalpontSystemCatalog : public datatypes::SystemCatalog
*/
struct TableName
{
TableName()
{
}
TableName() = default;
TableName(std::string sch, std::string tb) : schema(sch), table(tb)
{
}

View File

@ -56,7 +56,7 @@ class ClientRotator
}
}
/** @brief connnect
/** @brief connect
*
* Try connecting to client based on session id. If no connection,
* try connectList.
@ -79,7 +79,7 @@ class ClientRotator
{
fClient->shutdown();
delete fClient;
fClient = 0;
fClient = nullptr;
}
}
@ -140,7 +140,7 @@ class ClientRotator
*/
bool exeConnect(const std::string& clientName);
/** @brief connnect to list
/** @brief connect to list
*
* Try connecting to next client on list
* until timeout lapses. Then throw exception.

View File

@ -67,22 +67,23 @@ class ConstantColumn : public ReturnedColumn
/**
* ctor
*/
ConstantColumn(const std::string& sql, TYPE type = LITERAL);
explicit ConstantColumn(const std::string& sql, TYPE type = LITERAL);
/**
* ctor
*/
ConstantColumn(const int64_t val, TYPE type = NUM); // deprecate
explicit ConstantColumn(const int64_t val, TYPE type = NUM); // deprecate
/**
* ctor
*/
ConstantColumn(const uint64_t val, TYPE type = NUM, int8_t scale = 0, uint8_t precision = 0); // deprecate
explicit ConstantColumn(const uint64_t val, TYPE type = NUM, int8_t scale = 0,
uint8_t precision = 0); // deprecate
// There are more ctors below...
/**
* dtor
*/
virtual ~ConstantColumn();
~ConstantColumn() override;
/*
* Accessor Methods
@ -144,25 +145,25 @@ class ConstantColumn : public ReturnedColumn
/**
* accessor
*/
virtual const std::string data() const override;
const std::string data() const override;
/**
* accessor
*/
virtual void data(const std::string data) override
void data(const std::string data) override
{
fData = data;
}
/**
* accessor
*/
virtual const std::string toString() const override;
const std::string toString() const override;
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
/** return a copy of this pointer
*
* deep copy of this pointer and return the copy
*/
inline virtual ConstantColumn* clone() const override
inline ConstantColumn* clone() const override
{
return new ConstantColumn(*this);
}
@ -173,18 +174,18 @@ class ConstantColumn : public ReturnedColumn
/**
* serialize
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
void serialize(messageqcpp::ByteStream&) const override;
/**
* unserialize
*/
virtual void unserialize(messageqcpp::ByteStream&) override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -198,7 +199,7 @@ class ConstantColumn : public ReturnedColumn
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -207,13 +208,13 @@ class ConstantColumn : public ReturnedColumn
*/
bool operator!=(const ConstantColumn& t) const;
virtual bool hasWindowFunc() override
bool hasWindowFunc() override
{
return false;
}
/** Constant column on the filte can always be moved into derived table */
virtual void setDerivedTable() override
void setDerivedTable() override
{
fDerivedTable = std::string("*");
}
@ -267,7 +268,7 @@ class ConstantColumn : public ReturnedColumn
/**
* F&E
*/
virtual bool getBoolVal(rowgroup::Row& row, bool& isNull) override
bool getBoolVal(rowgroup::Row& row, bool& isNull) override
{
isNull = isNull || (fType == NULLDATA);
return TreeNode::getBoolVal();
@ -275,7 +276,7 @@ class ConstantColumn : public ReturnedColumn
/**
* F&E
*/
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
{
isNull = isNull || (fType == NULLDATA);
return fResult.strVal;
@ -283,7 +284,7 @@ class ConstantColumn : public ReturnedColumn
/**
* F&E
*/
virtual int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
{
isNull = isNull || (fType == NULLDATA);
return fResult.intVal;
@ -291,7 +292,7 @@ class ConstantColumn : public ReturnedColumn
/**
* F&E
*/
virtual uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override
uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override
{
isNull = isNull || (fType == NULLDATA);
return fResult.uintVal;
@ -299,7 +300,7 @@ class ConstantColumn : public ReturnedColumn
/**
* F&E
*/
virtual float getFloatVal(rowgroup::Row& row, bool& isNull) override
float getFloatVal(rowgroup::Row& row, bool& isNull) override
{
isNull = isNull || (fType == NULLDATA);
return fResult.floatVal;
@ -307,7 +308,7 @@ class ConstantColumn : public ReturnedColumn
/**
* F&E
*/
virtual double getDoubleVal(rowgroup::Row& row, bool& isNull) override
double getDoubleVal(rowgroup::Row& row, bool& isNull) override
{
isNull = isNull || (fType == NULLDATA);
return fResult.doubleVal;
@ -315,7 +316,7 @@ class ConstantColumn : public ReturnedColumn
/**
* F&E
*/
virtual IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override
IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override
{
isNull = isNull || (fType == NULLDATA);
return fResult.decimalVal;
@ -323,7 +324,7 @@ class ConstantColumn : public ReturnedColumn
/**
* F&E
*/
virtual int32_t getDateIntVal(rowgroup::Row& row, bool& isNull) override
int32_t getDateIntVal(rowgroup::Row& row, bool& isNull) override
{
isNull = isNull || (fType == NULLDATA);
@ -338,7 +339,7 @@ class ConstantColumn : public ReturnedColumn
/**
* F&E
*/
virtual int64_t getDatetimeIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getDatetimeIntVal(rowgroup::Row& row, bool& isNull) override
{
isNull = isNull || (fType == NULLDATA);
@ -354,7 +355,7 @@ class ConstantColumn : public ReturnedColumn
/**
* F&E
*/
virtual int64_t getTimestampIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getTimestampIntVal(rowgroup::Row& row, bool& isNull) override
{
isNull = isNull || (fType == NULLDATA);
@ -370,7 +371,7 @@ class ConstantColumn : public ReturnedColumn
/**
* F&E
*/
virtual int64_t getTimeIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getTimeIntVal(rowgroup::Row& row, bool& isNull) override
{
isNull = isNull || (fType == NULLDATA);
@ -409,7 +410,7 @@ class ConstantColumnNull : public ConstantColumn
class ConstantColumnString : public ConstantColumn
{
public:
ConstantColumnString(const std::string& str) : ConstantColumn(str, ConstantColumn::LITERAL)
explicit ConstantColumnString(const std::string& str) : ConstantColumn(str, ConstantColumn::LITERAL)
{
}
};
@ -471,7 +472,6 @@ std::ostream& operator<<(std::ostream& output, const ConstantColumn& rhs);
class RollupMarkColumn : public ReturnedColumn
{
public:
/**
* ctor
*/
@ -483,7 +483,7 @@ class RollupMarkColumn : public ReturnedColumn
/**
* dtor
*/
virtual ~RollupMarkColumn();
~RollupMarkColumn() override;
/**
* accessor
@ -502,26 +502,26 @@ class RollupMarkColumn : public ReturnedColumn
/**
* accessor
*/
virtual const std::string data() const override
const std::string data() const override
{
return "";
}
/**
* accessor
*/
virtual void data(const std::string data) override
void data(const std::string data) override
{
idbassert(0);
}
/**
* accessor
*/
virtual const std::string toString() const override
const std::string toString() const override
{
return "RollupMarkColumn";
}
virtual std::string toCppCode(IncludeSet& includes) const override
std::string toCppCode(IncludeSet& includes) const override
{
idbassert(0);
}
@ -529,7 +529,7 @@ class RollupMarkColumn : public ReturnedColumn
*
* deep copy of this pointer and return the copy
*/
inline virtual RollupMarkColumn* clone() const override
inline RollupMarkColumn* clone() const override
{
return new RollupMarkColumn();
}
@ -540,18 +540,18 @@ class RollupMarkColumn : public ReturnedColumn
/**
* serialize
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
void serialize(messageqcpp::ByteStream&) const override;
/**
* unserialize
*/
virtual void unserialize(messageqcpp::ByteStream&) override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override
bool operator==(const TreeNode* t) const override
{
return false;
}
@ -571,7 +571,7 @@ class RollupMarkColumn : public ReturnedColumn
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override
bool operator!=(const TreeNode* t) const override
{
return true;
}
@ -586,13 +586,13 @@ class RollupMarkColumn : public ReturnedColumn
return false;
}
virtual bool hasWindowFunc() override
bool hasWindowFunc() override
{
return false;
}
/** Constant column on the filte can always be moved into derived table */
virtual void setDerivedTable() override
void setDerivedTable() override
{
fDerivedTable = std::string("*");
}
@ -617,18 +617,18 @@ class RollupMarkColumn : public ReturnedColumn
/**
* F&E
*/
virtual bool getBoolVal(rowgroup::Row& row, bool& isNull) override
bool getBoolVal(rowgroup::Row& row, bool& isNull) override
{
return true;
}
/**
* F&E
*/
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override;
const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override;
/**
* F&E
*/
virtual int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
{
isNull = false;
return 0x12340000UL;
@ -636,28 +636,28 @@ class RollupMarkColumn : public ReturnedColumn
/**
* F&E
*/
virtual uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override
uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override
{
return getIntVal(row, isNull);
}
/**
* F&E
*/
virtual float getFloatVal(rowgroup::Row& row, bool& isNull) override
float getFloatVal(rowgroup::Row& row, bool& isNull) override
{
return getIntVal(row, isNull);
}
/**
* F&E
*/
virtual double getDoubleVal(rowgroup::Row& row, bool& isNull) override
double getDoubleVal(rowgroup::Row& row, bool& isNull) override
{
return getIntVal(row, isNull);
}
/**
* F&E
*/
virtual IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override
IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override
{
isNull = false;
return fResult.decimalVal;
@ -665,7 +665,7 @@ class RollupMarkColumn : public ReturnedColumn
/**
* F&E
*/
virtual int32_t getDateIntVal(rowgroup::Row& row, bool& isNull) override
int32_t getDateIntVal(rowgroup::Row& row, bool& isNull) override
{
isNull = false;
@ -680,7 +680,7 @@ class RollupMarkColumn : public ReturnedColumn
/**
* F&E
*/
virtual int64_t getDatetimeIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getDatetimeIntVal(rowgroup::Row& row, bool& isNull) override
{
isNull = false;
@ -696,7 +696,7 @@ class RollupMarkColumn : public ReturnedColumn
/**
* F&E
*/
virtual int64_t getTimestampIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getTimestampIntVal(rowgroup::Row& row, bool& isNull) override
{
isNull = false;
@ -712,7 +712,7 @@ class RollupMarkColumn : public ReturnedColumn
/**
* F&E
*/
virtual int64_t getTimeIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getTimeIntVal(rowgroup::Row& row, bool& isNull) override
{
isNull = false;

View File

@ -64,7 +64,7 @@ class ConstantFilter : public Filter
*/
ConstantFilter();
ConstantFilter(const SOP& op, ReturnedColumn* lhs, ReturnedColumn* rhs);
ConstantFilter(SimpleFilter* sf);
explicit ConstantFilter(SimpleFilter* sf);
// for code generation purposes only
ConstantFilter(const SOP& op, const FilterList& filterList, const SRCP& col,
const std::string& functionName, const std::string& data);
@ -75,7 +75,7 @@ class ConstantFilter : public Filter
/**
* Destructors
*/
virtual ~ConstantFilter();
~ConstantFilter() override;
/**
* Accessor Methods
@ -114,20 +114,20 @@ class ConstantFilter : public Filter
}
// virtual const std::string data() const;
virtual const std::string toString() const override;
virtual std::string toCppCode(IncludeSet& includes) const override;
const std::string toString() const override;
std::string toCppCode(IncludeSet& includes) const override;
/**
* The serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -141,7 +141,7 @@ class ConstantFilter : public Filter
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -188,17 +188,17 @@ class ConstantFilter : public Filter
FilterList fFilterList; /// vector of simple filters
SRCP fCol; /// the common column
std::string fFunctionName; /// function name
/***********************************************************
* F&E framework *
***********************************************************/
/***********************************************************
* F&E framework *
***********************************************************/
public:
ConstantFilter(const ConstantFilter& rhs);
inline virtual ConstantFilter* clone() const override
inline ConstantFilter* clone() const override
{
return new ConstantFilter(*this);
}
inline virtual bool getBoolVal(rowgroup::Row& row, bool& isNull) override;
inline bool getBoolVal(rowgroup::Row& row, bool& isNull) override;
// get all simple columns involved in this column
const std::vector<SimpleColumn*>& simpleColumnList();

View File

@ -49,9 +49,9 @@ class ExistsFilter : public Filter
* Constructors
*/
ExistsFilter();
ExistsFilter(const SCSEP& sub, const bool existsFlag = false, const bool correlated = false);
explicit ExistsFilter(const SCSEP& sub, const bool existsFlag = false, const bool correlated = false);
ExistsFilter(const ExistsFilter& rhs);
virtual ~ExistsFilter();
~ExistsFilter() override;
/**
* Accessor Methods
@ -87,19 +87,19 @@ class ExistsFilter : public Filter
* Overloaded stream operator
*/
// virtual std::ostream& operator<< (std::ostream& output);
virtual const std::string toString() const override;
virtual std::string toCppCode(IncludeSet& includes) const override;
const std::string toString() const override;
std::string toCppCode(IncludeSet& includes) const override;
/**
* The serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** return a copy of this pointer
*
* deep copy of this pointer and return the copy
*/
inline virtual ExistsFilter* clone() const override
inline ExistsFilter* clone() const override
{
return new ExistsFilter(*this);
}
@ -109,7 +109,7 @@ class ExistsFilter : public Filter
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -123,7 +123,7 @@ class ExistsFilter : public Filter
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*

View File

@ -53,12 +53,12 @@ struct Token
TreeNode* value;
bool is_operator() const
{
if (value == 0)
if (value == nullptr)
return false;
return (typeid(*value) == typeid(Operator));
}
Token() : value(0)
Token() : value(nullptr)
{
}
Token(TreeNode* v) : value(v)

View File

@ -60,14 +60,14 @@ class Filter : public TreeNode
* Constructors
*/
Filter();
Filter(const std::string& sql);
explicit Filter(const std::string& sql);
// not needed yet
// Filter(const Filter& rhs);
/**
* Destructors
*/
virtual ~Filter();
~Filter() override;
/**
* Accessor Methods
*/
@ -75,15 +75,15 @@ class Filter : public TreeNode
/**
* Operations
*/
virtual const std::string toString() const override;
const std::string toString() const override;
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
virtual const std::string data() const override
const std::string data() const override
{
return fData;
}
virtual void data(const std::string data) override
void data(const std::string data) override
{
fData = data;
}
@ -92,7 +92,7 @@ class Filter : public TreeNode
*
* deep copy of this pointer and return the copy
*/
inline virtual Filter* clone() const override
inline Filter* clone() const override
{
return new Filter(*this);
}
@ -100,15 +100,15 @@ class Filter : public TreeNode
/**
* The serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -122,7 +122,7 @@ class Filter : public TreeNode
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -133,9 +133,9 @@ class Filter : public TreeNode
/** @brief test if this filter can be combined with the argument filter
* This is for operation combine optimization
* @param f the filter that this fiter tries to combine with
* @param f the filter that this filter tries to combine with
* @param op the operator that connects the two filters. if one or both of the
* two filters is constantFilter, need to make sure operator is consistant.
* two filters is constantFilter, need to make sure operator is consistent.
* @return a filter(constantfilter) if successfully combined. otherwise
* return NULL
* For Oracle front end. Deprecated now.

View File

@ -51,11 +51,11 @@ class FunctionColumn : public ReturnedColumn
{
public:
FunctionColumn();
FunctionColumn(std::string& funcName);
explicit FunctionColumn(std::string& funcName);
FunctionColumn(const std::string& functionName, const std::string& funcParmsInString,
const uint32_t sessionID = 0);
FunctionColumn(const FunctionColumn& rhs, const uint32_t sessionID = 0);
virtual ~FunctionColumn();
~FunctionColumn() override;
/** get function name
*
@ -131,19 +131,19 @@ class FunctionColumn : public ReturnedColumn
fTimeZone = timeZone;
}
virtual const std::string data() const override;
virtual void data(const std::string data) override
const std::string data() const override;
void data(const std::string data) override
{
fData = data;
}
virtual const std::string toString() const override;
const std::string toString() const override;
/** return a copy of this pointer
*
* deep copy of this pointer and return the copy
*/
inline virtual FunctionColumn* clone() const override
inline FunctionColumn* clone() const override
{
return new FunctionColumn(*this);
}
@ -151,20 +151,20 @@ class FunctionColumn : public ReturnedColumn
/**
* The serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
using ReturnedColumn::hasAggregate;
virtual bool hasAggregate() override;
virtual bool hasWindowFunc() override;
virtual void setDerivedTable() override;
virtual void replaceRealCol(std::vector<SRCP>&) override;
bool hasAggregate() override;
bool hasWindowFunc() override;
void setDerivedTable() override;
void replaceRealCol(std::vector<SRCP>&) override;
virtual const std::vector<SimpleColumn*>& simpleColumnList() const override
{
return fSimpleColumnList;
}
virtual void setSimpleColumnList() override;
void setSimpleColumnList() override;
/**
* Return the tableAlias name of the table that the column arguments belong to.
*
@ -172,9 +172,9 @@ class FunctionColumn : public ReturnedColumn
* @return true, if all arguments belong to one table
* false, if multiple tables are involved in the function
*/
virtual bool singleTable(CalpontSystemCatalog::TableAliasName& tan) override;
bool singleTable(CalpontSystemCatalog::TableAliasName& tan) override;
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
private:
/**
@ -190,7 +190,7 @@ class FunctionColumn : public ReturnedColumn
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -204,7 +204,7 @@ class FunctionColumn : public ReturnedColumn
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -217,7 +217,7 @@ class FunctionColumn : public ReturnedColumn
* F&E framework *
***********************************************************/
public:
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
{
fOperationType.setTimeZone(fTimeZone);
fResult.strVal.dropString();
@ -228,32 +228,32 @@ class FunctionColumn : public ReturnedColumn
}
return fResult.strVal;
}
virtual int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
{
fOperationType.setTimeZone(fTimeZone);
return fFunctor->getIntVal(row, fFunctionParms, isNull, fOperationType);
}
virtual uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override
uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override
{
fOperationType.setTimeZone(fTimeZone);
return fFunctor->getUintVal(row, fFunctionParms, isNull, fOperationType);
}
virtual float getFloatVal(rowgroup::Row& row, bool& isNull) override
float getFloatVal(rowgroup::Row& row, bool& isNull) override
{
fOperationType.setTimeZone(fTimeZone);
return fFunctor->getFloatVal(row, fFunctionParms, isNull, fOperationType);
}
virtual double getDoubleVal(rowgroup::Row& row, bool& isNull) override
double getDoubleVal(rowgroup::Row& row, bool& isNull) override
{
fOperationType.setTimeZone(fTimeZone);
return fFunctor->getDoubleVal(row, fFunctionParms, isNull, fOperationType);
}
virtual long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override
long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override
{
fOperationType.setTimeZone(fTimeZone);
return fFunctor->getLongDoubleVal(row, fFunctionParms, isNull, fOperationType);
}
virtual IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override
IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override
{
fOperationType.setTimeZone(fTimeZone);
IDB_Decimal decimal = fFunctor->getDecimalVal(row, fFunctionParms, isNull, fOperationType);
@ -290,36 +290,37 @@ class FunctionColumn : public ReturnedColumn
if (fResultType.scale > decimal.scale)
decimal.value *= IDB_pow[fResultType.scale - decimal.scale];
else
decimal.value = (int64_t)(
decimal.value > 0 ? (double)decimal.value / IDB_pow[decimal.scale - fResultType.scale] + 0.5
: (double)decimal.value / IDB_pow[decimal.scale - fResultType.scale] - 0.5);
decimal.value =
(int64_t)(decimal.value > 0
? (double)decimal.value / IDB_pow[decimal.scale - fResultType.scale] + 0.5
: (double)decimal.value / IDB_pow[decimal.scale - fResultType.scale] - 0.5);
}
decimal.scale = fResultType.scale;
decimal.precision = std::max(fResultType.precision, static_cast<int32_t>(decimal.precision));
return decimal;
}
virtual bool getBoolVal(rowgroup::Row& row, bool& isNull) override
bool getBoolVal(rowgroup::Row& row, bool& isNull) override
{
fOperationType.setTimeZone(fTimeZone);
return fFunctor->getBoolVal(row, fFunctionParms, isNull, fOperationType);
}
virtual int32_t getDateIntVal(rowgroup::Row& row, bool& isNull) override
int32_t getDateIntVal(rowgroup::Row& row, bool& isNull) override
{
fOperationType.setTimeZone(fTimeZone);
return fFunctor->getDateIntVal(row, fFunctionParms, isNull, fOperationType);
}
virtual int64_t getDatetimeIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getDatetimeIntVal(rowgroup::Row& row, bool& isNull) override
{
fOperationType.setTimeZone(fTimeZone);
return fFunctor->getDatetimeIntVal(row, fFunctionParms, isNull, fOperationType);
}
virtual int64_t getTimestampIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getTimestampIntVal(rowgroup::Row& row, bool& isNull) override
{
fOperationType.setTimeZone(fTimeZone);
return fFunctor->getTimestampIntVal(row, fFunctionParms, isNull, fOperationType);
}
virtual int64_t getTimeIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getTimeIntVal(rowgroup::Row& row, bool& isNull) override
{
fOperationType.setTimeZone(fTimeZone);
return fFunctor->getTimeIntVal(row, fFunctionParms, isNull, fOperationType);
@ -332,8 +333,8 @@ class FunctionColumn : public ReturnedColumn
private:
funcexp::FunctionParm fFunctionParms;
funcexp::Func* fFunctor; /// functor to execute this function
funcexp::Func* fDynamicFunctor = NULL; // for rand encode decode
funcexp::Func* fFunctor; /// functor to execute this function
funcexp::Func* fDynamicFunctor = nullptr; // for rand encode decode
bool fFixed = false;
};

View File

@ -52,25 +52,25 @@ class GroupConcatColumn : public AggregateColumn
*/
GroupConcatColumn();
GroupConcatColumn(const uint32_t sessionID);
explicit GroupConcatColumn(const uint32_t sessionID);
GroupConcatColumn(const GroupConcatColumn& rhs, const uint32_t sessionID = 0);
/**
* Destructors
*/
virtual ~GroupConcatColumn();
~GroupConcatColumn() override;
/**
* Overloaded stream operator
*/
virtual const std::string toString() const override;
const std::string toString() const override;
/** return a copy of this pointer
*
* deep copy of this pointer and return the copy
*/
virtual GroupConcatColumn* clone() const override
GroupConcatColumn* clone() const override
{
return new GroupConcatColumn(*this);
}
@ -98,8 +98,8 @@ class GroupConcatColumn : public AggregateColumn
/**
* Serialize interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -107,7 +107,7 @@ class GroupConcatColumn : public AggregateColumn
* @return true iff every member of t is a duplicate copy of every member of this;
* false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -124,7 +124,7 @@ class GroupConcatColumn : public AggregateColumn
* @return false iff every member of t is a duplicate copy of every member of this;
* true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -135,7 +135,7 @@ class GroupConcatColumn : public AggregateColumn
using AggregateColumn::operator!=;
virtual bool operator!=(const GroupConcatColumn& t) const;
virtual string toCppCode(IncludeSet& includes) const override;
string toCppCode(IncludeSet& includes) const override;
private:
std::vector<SRCP> fOrderCols;

View File

@ -79,9 +79,7 @@ class IntervalColumn : public ReturnedColumn
IntervalColumn();
IntervalColumn(SRCP&, int);
IntervalColumn(const IntervalColumn& rhs, const uint32_t sessionID = 0);
virtual ~IntervalColumn()
{
}
~IntervalColumn() override = default;
const SRCP& val() const
{
return fVal;
@ -99,22 +97,22 @@ class IntervalColumn : public ReturnedColumn
fIntervalType = intervalType;
}
const std::string toString() const override;
inline virtual IntervalColumn* clone() const override
inline IntervalColumn* clone() const override
{
return new IntervalColumn(*this);
}
using ReturnedColumn::hasAggregate;
virtual bool hasAggregate() override
bool hasAggregate() override
{
return false;
}
virtual bool hasWindowFunc() override
bool hasWindowFunc() override
{
return false;
}
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
private:
/**
@ -124,12 +122,12 @@ class IntervalColumn : public ReturnedColumn
int fIntervalType;
// okay to be private for now.
virtual bool operator==(const TreeNode* t) const override
bool operator==(const TreeNode* t) const override
{
return false;
}
bool operator==(const IntervalColumn& t) const;
virtual bool operator!=(const TreeNode* t) const override
bool operator!=(const TreeNode* t) const override
{
return false;
}

View File

@ -47,25 +47,25 @@ class JsonArrayAggColumn : public AggregateColumn
*/
JsonArrayAggColumn();
JsonArrayAggColumn(const uint32_t sessionID);
explicit JsonArrayAggColumn(const uint32_t sessionID);
JsonArrayAggColumn(const JsonArrayAggColumn& rhs, const uint32_t sessionID = 0);
/**
* Destructors
*/
virtual ~JsonArrayAggColumn();
~JsonArrayAggColumn() override;
/**
* Overloaded stream operator
*/
virtual const std::string toString() const override;
const std::string toString() const override;
/** return a copy of this pointer
*
* deep copy of this pointer and return the copy
*/
virtual JsonArrayAggColumn* clone() const override
JsonArrayAggColumn* clone() const override
{
return new JsonArrayAggColumn(*this);
}
@ -93,8 +93,8 @@ class JsonArrayAggColumn : public AggregateColumn
/**
* Serialize interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -102,7 +102,7 @@ class JsonArrayAggColumn : public AggregateColumn
* @return true iff every member of t is a duplicate copy of every member of this;
* false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -119,7 +119,7 @@ class JsonArrayAggColumn : public AggregateColumn
* @return false iff every member of t is a duplicate copy of every member of this;
* true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -130,7 +130,7 @@ class JsonArrayAggColumn : public AggregateColumn
using AggregateColumn::operator!=;
virtual bool operator!=(const JsonArrayAggColumn& t) const;
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
private:
std::vector<SRCP> fOrderCols;

View File

@ -27,7 +27,7 @@
#include <iosfwd>
#include <boost/shared_ptr.hpp>
//#include "expressionparser.h"
// #include "expressionparser.h"
#include "operator.h"
#include "parsetree.h"
@ -64,13 +64,13 @@ class LogicOperator : public Operator
* Constructors
*/
LogicOperator();
LogicOperator(const std::string& operatorName);
explicit LogicOperator(const std::string& operatorName);
LogicOperator(const LogicOperator& rhs);
/**
* Destructors
*/
virtual ~LogicOperator();
~LogicOperator() override;
/**
* Accessor Methods
@ -80,7 +80,7 @@ class LogicOperator : public Operator
*
* deep copy of this pointer and return the copy
*/
inline virtual LogicOperator* clone() const override
inline LogicOperator* clone() const override
{
return new LogicOperator(*this);
}
@ -88,15 +88,15 @@ class LogicOperator : public Operator
/**
* The serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -110,7 +110,7 @@ class LogicOperator : public Operator
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -123,7 +123,7 @@ class LogicOperator : public Operator
// F&E framework
using Operator::getBoolVal;
inline virtual bool getBoolVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
inline bool getBoolVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
{
switch (fOp)
{
@ -165,12 +165,12 @@ class LogicOperator : public Operator
}
using TreeNode::evaluate;
inline virtual void evaluate(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
inline void evaluate(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
{
fResult.boolVal = getBoolVal(row, isNull, lop, rop);
}
inline virtual std::string toCppCode(IncludeSet& includes) const override
inline std::string toCppCode(IncludeSet& includes) const override
{
includes.insert("logicoperator.h");
std::stringstream ss;

View File

@ -54,7 +54,7 @@ class MCSAnalyzeTableExecutionPlan : public CalpontExecutionPlan
{
}
virtual ~MCSAnalyzeTableExecutionPlan() = default;
~MCSAnalyzeTableExecutionPlan() override = default;
const ReturnedColumnList& returnedCols() const
{
@ -232,16 +232,16 @@ class MCSAnalyzeTableExecutionPlan : public CalpontExecutionPlan
return ((fSessionID & 0x80000000) != 0);
}
virtual void serialize(messageqcpp::ByteStream& bs) const;
void serialize(messageqcpp::ByteStream& bs) const override;
virtual void unserialize(messageqcpp::ByteStream& bs);
void unserialize(messageqcpp::ByteStream& bs) override;
// TODO: Why do we need this?
virtual bool operator==(const CalpontExecutionPlan* t) const
bool operator==(const CalpontExecutionPlan* t) const override
{
return false;
}
virtual bool operator!=(const CalpontExecutionPlan* t) const
bool operator!=(const CalpontExecutionPlan* t) const override
{
return false;
}

View File

@ -28,7 +28,7 @@
#include <exception>
#include <string>
#include <stdint.h>
#include <cstdint>
namespace messageqcpp
{
@ -53,9 +53,9 @@ class ObjectReader
class UnserializeException : public std::exception
{
public:
UnserializeException(std::string) throw();
virtual ~UnserializeException() throw();
virtual const char* what() const throw();
explicit UnserializeException(std::string) noexcept;
~UnserializeException() noexcept override;
const char* what() const noexcept override;
private:
std::string fWhat;

View File

@ -70,23 +70,23 @@ class Operator : public TreeNode
{
public:
Operator();
Operator(const std::string& operatorName);
explicit Operator(const std::string& operatorName);
Operator(const Operator& rhs);
virtual ~Operator();
~Operator() override;
virtual const std::string toString() const override;
virtual const std::string data() const override
const std::string toString() const override;
const std::string data() const override
{
return fData;
}
virtual void data(const std::string data) override;
void data(const std::string data) override;
/** return a copy of this pointer
*
* deep copy of this pointer and return the copy
*/
inline virtual Operator* clone() const override
inline Operator* clone() const override
{
return new Operator(*this);
}
@ -101,15 +101,15 @@ class Operator : public TreeNode
/**
* The serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -123,7 +123,7 @@ class Operator : public TreeNode
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -139,7 +139,7 @@ class Operator : public TreeNode
*/
virtual void reverseOp();
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
protected:
std::string fData;
@ -231,11 +231,11 @@ class Operator : public TreeNode
virtual void setOpType(Type& l, Type& r)
{
}
virtual void operationType(const Type& ot) override
void operationType(const Type& ot) override
{
fOperationType = ot;
}
virtual const Type& operationType() const override
const Type& operationType() const override
{
return fOperationType;
}

View File

@ -49,9 +49,9 @@ class OuterJoinOnFilter : public Filter
* Constructors
*/
OuterJoinOnFilter();
OuterJoinOnFilter(const SPTP& pt);
explicit OuterJoinOnFilter(const SPTP& pt);
OuterJoinOnFilter(const OuterJoinOnFilter& rhs);
virtual ~OuterJoinOnFilter();
~OuterJoinOnFilter() override;
/**
* Accessor Methods
@ -69,19 +69,19 @@ class OuterJoinOnFilter : public Filter
* Overloaded stream operator
*/
// virtual std::ostream& operator<< (std::ostream& output);
virtual const std::string toString() const override;
const std::string toString() const override;
/**
* The serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** return a copy of this pointer
*
* deep copy of this pointer and return the copy
*/
inline virtual OuterJoinOnFilter* clone() const override
inline OuterJoinOnFilter* clone() const override
{
return new OuterJoinOnFilter(*this);
}
@ -91,7 +91,7 @@ class OuterJoinOnFilter : public Filter
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -105,7 +105,7 @@ class OuterJoinOnFilter : public Filter
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -113,7 +113,8 @@ class OuterJoinOnFilter : public Filter
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
bool operator!=(const OuterJoinOnFilter& t) const;
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
private:
// default okay?
// OuterJoinOnFilter& operator=(const OuterJoinOnFilter& rhs);

View File

@ -59,7 +59,7 @@ class ParseTree
* Constructor / Destructor
*/
inline ParseTree();
inline ParseTree(TreeNode* data);
inline explicit ParseTree(TreeNode* data);
inline ParseTree(TreeNode* data, ParseTree* left, ParseTree* right);
inline ParseTree(const ParseTree& rhs);
inline virtual ~ParseTree();
@ -210,9 +210,9 @@ class ParseTree
inline static void deleter(ParseTree*& n)
{
delete n->fData;
n->fData = 0;
n->fData = nullptr;
delete n;
n = 0;
n = nullptr;
}
inline void derivedTable(const std::string& derivedTable)
@ -238,7 +238,7 @@ class ParseTree
{
ParseTree* node;
GoTo direction;
StackFrame(ParseTree* node_, GoTo direction_ = GoTo::Left) : node(node_), direction(direction_)
explicit StackFrame(ParseTree* node_, GoTo direction_ = GoTo::Left) : node(node_), direction(direction_)
{
}
};
@ -370,11 +370,11 @@ namespace execplan
/**
* Class Definition
*/
inline ParseTree::ParseTree() : fData(0), fLeft(0), fRight(0), fDerivedTable("")
inline ParseTree::ParseTree() : fData(nullptr), fLeft(nullptr), fRight(nullptr), fDerivedTable("")
{
}
inline ParseTree::ParseTree(TreeNode* data) : fData(data), fLeft(0), fRight(0)
inline ParseTree::ParseTree(TreeNode* data) : fData(data), fLeft(nullptr), fRight(nullptr)
{
// bug5984. Need to validate data to be not null
if (data)
@ -389,7 +389,7 @@ inline ParseTree::ParseTree(TreeNode* data, ParseTree* left, ParseTree* right)
}
inline ParseTree::ParseTree(const ParseTree& rhs)
: fData(0), fLeft(0), fRight(0), fDerivedTable(rhs.fDerivedTable)
: fData(nullptr), fLeft(nullptr), fRight(nullptr), fDerivedTable(rhs.fDerivedTable)
{
copyTree(rhs);
}
@ -613,22 +613,22 @@ inline ParseTree& ParseTree::operator=(const ParseTree& rhs)
inline void ParseTree::copyTree(const ParseTree& src)
{
if (fLeft != NULL)
if (fLeft != nullptr)
delete fLeft;
if (fRight != NULL)
if (fRight != nullptr)
delete fRight;
fLeft = NULL;
fRight = NULL;
fLeft = nullptr;
fRight = nullptr;
if (src.left() != NULL)
if (src.left() != nullptr)
{
fLeft = new ParseTree();
fLeft->copyTree(*(src.left()));
}
if (src.right() != NULL)
if (src.right() != nullptr)
{
fRight = new ParseTree();
fRight->copyTree(*(src.right()));
@ -636,29 +636,29 @@ inline void ParseTree::copyTree(const ParseTree& src)
delete fData;
if (src.data() == NULL)
fData = NULL;
if (src.data() == nullptr)
fData = nullptr;
else
fData = src.data()->clone();
}
inline void ParseTree::destroyTree(ParseTree* root)
{
if (root == NULL)
if (root == nullptr)
return;
if (root->left() != NULL)
if (root->left() != nullptr)
{
destroyTree(root->fLeft);
}
if (root->right() != NULL)
if (root->right() != nullptr)
{
destroyTree(root->fRight);
}
delete root;
root = 0;
root = nullptr;
}
inline void ParseTree::draw(const ParseTree* n, std::ostream& dotFile)
@ -668,13 +668,11 @@ inline void ParseTree::draw(const ParseTree* n, std::ostream& dotFile)
l = n->left();
r = n->right();
if (l != 0)
dotFile << "n" << (void*)n << " -> "
<< "n" << (void*)l << std::endl;
if (l != nullptr)
dotFile << "n" << (void*)n << " -> " << "n" << (void*)l << std::endl;
if (r != 0)
dotFile << "n" << (void*)n << " -> "
<< "n" << (void*)r << std::endl;
if (r != nullptr)
dotFile << "n" << (void*)n << " -> " << "n" << (void*)r << std::endl;
auto& node = *(n->data());
dotFile << "n" << (void*)n << " [label=\"" << n->data()->data() << " (" << n << ") "

View File

@ -27,7 +27,7 @@
#include <string>
#include <sstream>
#if defined(__FreeBSD__)
#if defined(__FreeBSD__)
#include <cstdlib>
#else
#include <alloca.h>
@ -52,15 +52,15 @@ class PredicateOperator : public Operator
{
public:
PredicateOperator();
PredicateOperator(const std::string& operatorName);
explicit PredicateOperator(const std::string& operatorName);
PredicateOperator(const PredicateOperator& rhs);
virtual ~PredicateOperator();
~PredicateOperator() override;
/** return a copy of this pointer
*
* deep copy of this pointer and return the copy
*/
inline virtual PredicateOperator* clone() const override
inline PredicateOperator* clone() const override
{
return new PredicateOperator(*this);
}
@ -68,15 +68,15 @@ class PredicateOperator : public Operator
/**
* The serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -90,7 +90,7 @@ class PredicateOperator : public Operator
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -107,10 +107,10 @@ class PredicateOperator : public Operator
* F&E framework *
***********************************************************/
using Operator::getBoolVal;
virtual bool getBoolVal(rowgroup::Row& row, bool& isNull, ReturnedColumn* lop, ReturnedColumn* rop) override;
bool getBoolVal(rowgroup::Row& row, bool& isNull, ReturnedColumn* lop, ReturnedColumn* rop) override;
void setOpType(Type& l, Type& r) override;
inline virtual std::string toCppCode(IncludeSet& includes) const override
inline std::string toCppCode(IncludeSet& includes) const override
{
includes.insert("predicateoperator.h");
std::stringstream ss;

View File

@ -62,7 +62,7 @@ class PseudoColumn : public SimpleColumn
* Constructors
*/
PseudoColumn();
PseudoColumn(const uint32_t pseudoType);
explicit PseudoColumn(const uint32_t pseudoType);
PseudoColumn(const std::string& token, const uint32_t pseudoType, const uint32_t sessionID = 0);
PseudoColumn(const std::string& schema, const std::string& table, const std::string& col,
const uint32_t pseudoType, const uint32_t sessionID = 0);
@ -74,13 +74,13 @@ class PseudoColumn : public SimpleColumn
/**
* Destructor
*/
virtual ~PseudoColumn();
~PseudoColumn() override;
/** return a copy of this pointer
*
* deep copy of this pointer and return the copy
*/
inline virtual PseudoColumn* clone() const override
inline PseudoColumn* clone() const override
{
return new PseudoColumn(*this);
}
@ -106,17 +106,17 @@ class PseudoColumn : public SimpleColumn
/**
* The serialize interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
virtual const std::string toString() const override;
const std::string toString() const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -130,7 +130,7 @@ class PseudoColumn : public SimpleColumn
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -141,7 +141,7 @@ class PseudoColumn : public SimpleColumn
static uint32_t pseudoNameToType(std::string& name);
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
private:
/**

View File

@ -83,20 +83,20 @@ class ReturnedColumn : public TreeNode
* Constructors
*/
ReturnedColumn();
ReturnedColumn(const std::string& sql);
ReturnedColumn(const uint32_t sessionID, const bool returnAll = false);
explicit ReturnedColumn(const std::string& sql);
explicit ReturnedColumn(const uint32_t sessionID, const bool returnAll = false);
ReturnedColumn(const ReturnedColumn& rhs, const uint32_t sessionID = 0);
/**
* Destructors
*/
virtual ~ReturnedColumn();
~ReturnedColumn() override;
/**
* Accessor Methods
*/
virtual const std::string data() const override;
virtual void data(const std::string data) override
const std::string data() const override;
void data(const std::string data) override
{
fData = data;
}
@ -231,22 +231,22 @@ class ReturnedColumn : public TreeNode
/**
* Operations
*/
virtual ReturnedColumn* clone() const override = 0;
ReturnedColumn* clone() const override = 0;
/**
* The serialize interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
virtual const std::string toString() const override;
virtual std::string toCppCode(IncludeSet& includes) const override;
const std::string toString() const override;
std::string toCppCode(IncludeSet& includes) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -261,7 +261,7 @@ class ReturnedColumn : public TreeNode
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*

View File

@ -56,13 +56,13 @@ class RowColumn : public ReturnedColumn
/**
* Constructors
*/
RowColumn(const uint32_t sessionID = 0);
explicit RowColumn(const uint32_t sessionID = 0);
RowColumn(const RowColumn& rhs, const uint32_t sessionID = 0);
RowColumn(const std::vector<SRCP>& columnVec, const uint32_t sessionID = 0);
explicit RowColumn(const std::vector<SRCP>& columnVec, const uint32_t sessionID = 0);
/**
* Destructor
*/
virtual ~RowColumn();
~RowColumn() override;
/**
* Accessor Methods
@ -80,7 +80,7 @@ class RowColumn : public ReturnedColumn
*
* deep copy of this pointer and return the copy
*/
inline virtual RowColumn* clone() const override
inline RowColumn* clone() const override
{
return new RowColumn(*this);
}
@ -95,20 +95,20 @@ class RowColumn : public ReturnedColumn
// virtual void serialize(messageqcpp::ByteStream&) const;
// virtual void unserialize(messageqcpp::ByteStream&);
virtual const std::string toString() const override;
const std::string toString() const override;
/**
* Serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -122,7 +122,7 @@ class RowColumn : public ReturnedColumn
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -131,16 +131,16 @@ class RowColumn : public ReturnedColumn
*/
bool operator!=(const RowColumn& t) const;
using ReturnedColumn::hasAggregate;
virtual bool hasAggregate() override
bool hasAggregate() override
{
return false;
}
virtual bool hasWindowFunc() override
bool hasWindowFunc() override
{
return false;
}
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
private:
/**
@ -156,23 +156,21 @@ class SubSelect : public ReturnedColumn
SubSelect() : ReturnedColumn()
{
}
~SubSelect()
{
}
~SubSelect() override = default;
SubSelect* clone() const override
{
return new SubSelect();
}
using ReturnedColumn::hasAggregate;
virtual bool hasAggregate() override
bool hasAggregate() override
{
return false;
}
virtual bool hasWindowFunc() override
bool hasWindowFunc() override
{
return false;
}
virtual const std::string toString() const override;
const std::string toString() const override;
};
/**

View File

@ -63,7 +63,7 @@ class SelectFilter : public Filter
/**
* Destructors
*/
virtual ~SelectFilter();
~SelectFilter() override;
/**
* Accessor Methods
@ -107,13 +107,13 @@ class SelectFilter : public Filter
fCorrelated = correlated;
}
virtual const std::string toString() const override;
virtual std::string toCppCode(IncludeSet& includes) const override;
virtual inline const std::string data() const override
const std::string toString() const override;
std::string toCppCode(IncludeSet& includes) const override;
inline const std::string data() const override
{
return fData;
}
virtual inline void data(const std::string data) override
inline void data(const std::string data) override
{
fData = data;
}
@ -130,14 +130,14 @@ class SelectFilter : public Filter
/**
* The serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** return a copy of this pointer
*
* deep copy of this pointer and return the copy
*/
inline virtual SelectFilter* clone() const override
inline SelectFilter* clone() const override
{
return new SelectFilter(*this);
}
@ -147,7 +147,7 @@ class SelectFilter : public Filter
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -161,7 +161,7 @@ class SelectFilter : public Filter
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*

View File

@ -67,7 +67,7 @@ namespace execplan
* immediately, causing all subsequent references to fail. This only affects
* 'leakcheck'.
*/
//#define DESTROYSHMSEG
// #define DESTROYSHMSEG
class SessionManager
{
@ -94,7 +94,7 @@ class SessionManager
* and no operation other than reset() should be performed on a
* SessionManager instantiated with this.
*/
SessionManager(bool nolock);
explicit SessionManager(bool nolock);
/** @brief Destructor
*
@ -211,4 +211,3 @@ class SessionManager
};
} // namespace execplan

View File

@ -36,7 +36,7 @@
#include "shmkeys.h"
#include "brmtypes.h"
//#define SM_DEBUG
// #define SM_DEBUG
namespace execplan
{
@ -132,7 +132,7 @@ class SessionMonitor
{
txnCount = 0;
verID = 0;
activeTxns = NULL;
activeTxns = nullptr;
};
};
typedef struct SessionMonitorData_struct SessionMonitorData_t;

View File

@ -57,13 +57,15 @@ class SimpleColumn : public ReturnedColumn
/**
* Constructors
*/
class ForTestPurposeWithoutOID{};
class ForTestPurposeWithoutOID
{
};
SimpleColumn();
SimpleColumn(const std::string& token, ForTestPurposeWithoutOID);
SimpleColumn(const std::string& token, const uint32_t sessionID = 0);
explicit SimpleColumn(const std::string& token, const uint32_t sessionID = 0);
SimpleColumn(const std::string& schema, const std::string& table, const std::string& col,
const uint32_t sessionID = 0, const int lower_case_table_names = 0);
@ -75,7 +77,7 @@ class SimpleColumn : public ReturnedColumn
/**
* Destructor
*/
virtual ~SimpleColumn();
~SimpleColumn() override;
/**
* Accessor Methods
@ -124,8 +126,8 @@ class SimpleColumn : public ReturnedColumn
fOid = oid;
}
virtual const std::string data() const override;
virtual void data(const std::string data) override
const std::string data() const override;
void data(const std::string data) override
{
fData = data;
}
@ -179,7 +181,7 @@ class SimpleColumn : public ReturnedColumn
*
* deep copy of this pointer and return the copy
*/
inline virtual SimpleColumn* clone() const override
inline SimpleColumn* clone() const override
{
return new SimpleColumn(*this);
}
@ -191,17 +193,17 @@ class SimpleColumn : public ReturnedColumn
/**
* The serialize interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
virtual const std::string toString() const override;
virtual std::string toCppCode(IncludeSet& includes) const override;
const std::string toString() const override;
std::string toCppCode(IncludeSet& includes) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -217,7 +219,7 @@ class SimpleColumn : public ReturnedColumn
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -227,7 +229,7 @@ class SimpleColumn : public ReturnedColumn
bool operator!=(const SimpleColumn& t) const;
/** @brief check if this column is the same as the argument */
virtual bool sameColumn(const ReturnedColumn* rc) const override;
bool sameColumn(const ReturnedColumn* rc) const override;
/** @brief return column type of this column (could be of any engine type) */
const CalpontSystemCatalog::ColType& colType() const
@ -238,7 +240,7 @@ class SimpleColumn : public ReturnedColumn
/** @brief set the column's OID from the syscat */
void setOID();
virtual bool hasWindowFunc() override
bool hasWindowFunc() override
{
return false;
}
@ -252,7 +254,7 @@ class SimpleColumn : public ReturnedColumn
* @return true, if all arguments belong to one table
* false, if multiple tables are involved in the function
*/
virtual bool singleTable(CalpontSystemCatalog::TableAliasName& tan) override;
bool singleTable(CalpontSystemCatalog::TableAliasName& tan) override;
protected:
/**
@ -282,13 +284,13 @@ class SimpleColumn : public ReturnedColumn
* F&E framework *
***********************************************************/
public:
virtual void evaluate(rowgroup::Row& row, bool& isNull) override;
virtual bool getBoolVal(rowgroup::Row& row, bool& isNull) override
void evaluate(rowgroup::Row& row, bool& isNull) override;
bool getBoolVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getBoolVal();
}
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
{
bool localIsNull = false;
evaluate(row, localIsNull);
@ -301,37 +303,37 @@ class SimpleColumn : public ReturnedColumn
return TreeNode::getStrVal(fTimeZone);
}
virtual int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getIntVal();
}
virtual uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override
uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getUintVal();
}
virtual float getFloatVal(rowgroup::Row& row, bool& isNull) override
float getFloatVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getFloatVal();
}
virtual double getDoubleVal(rowgroup::Row& row, bool& isNull) override
double getDoubleVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getDoubleVal();
}
virtual long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override
long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getLongDoubleVal();
}
virtual IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override
IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);

View File

@ -54,35 +54,33 @@ class SimpleColumn_Decimal : public SimpleColumn
public:
/** Constructors */
SimpleColumn_Decimal();
SimpleColumn_Decimal(const std::string& token, const uint32_t sessionID = 0);
explicit SimpleColumn_Decimal(const std::string& token, const uint32_t sessionID = 0);
SimpleColumn_Decimal(const std::string& schema, const std::string& table, const std::string& col,
const bool isColumnStore, const uint32_t sessionID = 0);
SimpleColumn_Decimal(const SimpleColumn& rhs, const uint32_t sessionID = 0);
explicit SimpleColumn_Decimal(const SimpleColumn& rhs, const uint32_t sessionID = 0);
/** Destructor */
virtual ~SimpleColumn_Decimal()
{
}
~SimpleColumn_Decimal() override = default;
inline virtual SimpleColumn_Decimal* clone() const override
inline SimpleColumn_Decimal* clone() const override
{
return new SimpleColumn_Decimal<len>(*this);
}
/** Evaluate methods */
virtual inline const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override;
virtual inline int64_t getIntVal(rowgroup::Row& row, bool& isNull) override;
virtual inline float getFloatVal(rowgroup::Row& row, bool& isNull) override;
virtual inline double getDoubleVal(rowgroup::Row& row, bool& isNull) override;
virtual inline long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override;
virtual inline IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override;
inline const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override;
inline int64_t getIntVal(rowgroup::Row& row, bool& isNull) override;
inline float getFloatVal(rowgroup::Row& row, bool& isNull) override;
inline double getDoubleVal(rowgroup::Row& row, bool& isNull) override;
inline long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override;
inline IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override;
/** The serialize interface */
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
uint64_t fNullVal;
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
private:
void setNullVal();

View File

@ -53,36 +53,34 @@ class SimpleColumn_INT : public SimpleColumn
public:
/** Constructors */
SimpleColumn_INT();
SimpleColumn_INT(const std::string& token, const uint32_t sessionID = 0);
explicit SimpleColumn_INT(const std::string& token, const uint32_t sessionID = 0);
SimpleColumn_INT(const std::string& schema, const std::string& table, const std::string& col,
const bool isColumnStore, const uint32_t sessionID = 0);
SimpleColumn_INT(const SimpleColumn& rhs, const uint32_t sessionID = 0);
explicit SimpleColumn_INT(const SimpleColumn& rhs, const uint32_t sessionID = 0);
/** Destructor */
virtual ~SimpleColumn_INT()
{
}
~SimpleColumn_INT() override = default;
inline virtual SimpleColumn_INT* clone() const override
inline SimpleColumn_INT* clone() const override
{
return new SimpleColumn_INT<len>(*this);
}
/** Evaluate methods */
virtual inline const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override;
virtual inline int64_t getIntVal(rowgroup::Row& row, bool& isNull) override;
virtual inline uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override;
virtual inline float getFloatVal(rowgroup::Row& row, bool& isNull) override;
virtual inline double getDoubleVal(rowgroup::Row& row, bool& isNull) override;
virtual inline long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override;
virtual inline IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override;
inline const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override;
inline int64_t getIntVal(rowgroup::Row& row, bool& isNull) override;
inline uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override;
inline float getFloatVal(rowgroup::Row& row, bool& isNull) override;
inline double getDoubleVal(rowgroup::Row& row, bool& isNull) override;
inline long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override;
inline IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override;
/** The serialize interface */
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
uint64_t fNullVal;
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
private:
void setNullVal();
@ -93,8 +91,8 @@ std::string SimpleColumn_INT<len>::toCppCode(IncludeSet& includes) const
{
includes.insert("simplecolumn_int.h");
std::stringstream ss;
ss << "SimpleColumn_INT<" << len << ">(" << std::quoted(fSchemaName) << ", " << std::quoted(fTableName) << ", " <<
std::quoted(fColumnName) << ", " << fisColumnStore << ", " << sessionID() << ")";
ss << "SimpleColumn_INT<" << len << ">(" << std::quoted(fSchemaName) << ", " << std::quoted(fTableName)
<< ", " << std::quoted(fColumnName) << ", " << fisColumnStore << ", " << sessionID() << ")";
return ss.str();
}
@ -146,7 +144,7 @@ void SimpleColumn_INT<len>::setNullVal()
}
template <int len>
inline const utils::NullString & SimpleColumn_INT<len>::getStrVal(rowgroup::Row& row, bool& isNull)
inline const utils::NullString& SimpleColumn_INT<len>::getStrVal(rowgroup::Row& row, bool& isNull)
{
if (row.equals<len>(fNullVal, fInputIndex))
{

View File

@ -53,36 +53,34 @@ class SimpleColumn_UINT : public SimpleColumn
public:
/** Constructors */
SimpleColumn_UINT();
SimpleColumn_UINT(const std::string& token, const uint32_t sessionID = 0);
explicit SimpleColumn_UINT(const std::string& token, const uint32_t sessionID = 0);
SimpleColumn_UINT(const std::string& schema, const std::string& table, const std::string& col,
const bool isColumnStore, const uint32_t sessionID = 0);
SimpleColumn_UINT(const SimpleColumn& rhs, const uint32_t sessionID = 0);
explicit SimpleColumn_UINT(const SimpleColumn& rhs, const uint32_t sessionID = 0);
/** Destructor */
virtual ~SimpleColumn_UINT()
{
}
~SimpleColumn_UINT() override = default;
inline virtual SimpleColumn_UINT* clone() const override
inline SimpleColumn_UINT* clone() const override
{
return new SimpleColumn_UINT<len>(*this);
}
/** Evaluate methods */
virtual inline const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override;
virtual inline int64_t getIntVal(rowgroup::Row& row, bool& isNull) override;
virtual inline uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override;
virtual inline float getFloatVal(rowgroup::Row& row, bool& isNull) override;
virtual inline double getDoubleVal(rowgroup::Row& row, bool& isNull) override;
virtual inline long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override;
virtual inline IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override;
inline const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override;
inline int64_t getIntVal(rowgroup::Row& row, bool& isNull) override;
inline uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override;
inline float getFloatVal(rowgroup::Row& row, bool& isNull) override;
inline double getDoubleVal(rowgroup::Row& row, bool& isNull) override;
inline long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override;
inline IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override;
/** The serialize interface */
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
uint64_t fNullVal;
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
private:
void setNullVal();

View File

@ -65,17 +65,19 @@ class SimpleFilter : public Filter
SEMI
};
struct ForTestPurposesWithoutColumnsOIDS{};
struct ForTestPurposesWithoutColumnsOIDS
{
};
SimpleFilter();
SimpleFilter(const std::string& sql);
explicit SimpleFilter(const std::string& sql);
SimpleFilter(const std::string& sql, ForTestPurposesWithoutColumnsOIDS);
SimpleFilter(const SOP& op, ReturnedColumn* lhs, ReturnedColumn* rhs, const long timeZone = 0);
SimpleFilter(const SimpleFilter& rhs);
virtual ~SimpleFilter();
~SimpleFilter() override;
inline virtual SimpleFilter* clone() const override
inline SimpleFilter* clone() const override
{
return new SimpleFilter(*this);
}
@ -106,7 +108,7 @@ class SimpleFilter : public Filter
}
using Filter::data;
virtual const std::string data() const override;
const std::string data() const override;
/** assign fLhs
*
@ -129,20 +131,20 @@ class SimpleFilter : public Filter
*/
void rhs(ReturnedColumn* rhs);
virtual const std::string toString() const override;
const std::string toString() const override;
/**
* The serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true if every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -160,7 +162,6 @@ class SimpleFilter : public Filter
bool operator<(const SimpleFilter& t) const;
bool semanticEq(const SimpleFilter& t) const;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
@ -168,7 +169,7 @@ class SimpleFilter : public Filter
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false if every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -221,7 +222,7 @@ class SimpleFilter : public Filter
static std::string escapeString(const std::string& input);
virtual string toCppCode(IncludeSet& includes) const override;
string toCppCode(IncludeSet& includes) const override;
private:
SOP fOp; /// operator
@ -237,10 +238,10 @@ class SimpleFilter : public Filter
* F&E framework *
***********************************************************/
public:
inline virtual bool getBoolVal(rowgroup::Row& row, bool& isNull) override;
inline virtual int64_t getIntVal(rowgroup::Row& row, bool& isNull) override;
inline virtual double getDoubleVal(rowgroup::Row& row, bool& isNull) override;
inline virtual long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override;
inline bool getBoolVal(rowgroup::Row& row, bool& isNull) override;
inline int64_t getIntVal(rowgroup::Row& row, bool& isNull) override;
inline double getDoubleVal(rowgroup::Row& row, bool& isNull) override;
inline long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override;
// get all simple columns involved in this column
const std::vector<SimpleColumn*>& simpleColumnList();

View File

@ -65,7 +65,7 @@ class SimpleScalarFilter : public Filter
/**
* Destructors
*/
virtual ~SimpleScalarFilter();
~SimpleScalarFilter() override;
/**
* Accessor Methods
@ -100,13 +100,13 @@ class SimpleScalarFilter : public Filter
fSub = sub;
}
virtual const std::string toString() const override;
const std::string toString() const override;
virtual inline const std::string data() const override
inline const std::string data() const override
{
return fData;
}
virtual inline void data(const std::string data) override
inline void data(const std::string data) override
{
fData = data;
}
@ -114,14 +114,14 @@ class SimpleScalarFilter : public Filter
/**
* The serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** return a copy of this pointer
*
* deep copy of this pointer and return the copy
*/
inline virtual SimpleScalarFilter* clone() const override
inline SimpleScalarFilter* clone() const override
{
return new SimpleScalarFilter(*this);
}
@ -131,7 +131,7 @@ class SimpleScalarFilter : public Filter
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -145,7 +145,7 @@ class SimpleScalarFilter : public Filter
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -154,7 +154,7 @@ class SimpleScalarFilter : public Filter
*/
bool operator!=(const SimpleScalarFilter& t) const;
virtual string toCppCode(IncludeSet& includes) const override;
string toCppCode(IncludeSet& includes) const override;
private:
// default okay?

View File

@ -269,7 +269,9 @@ class TreeNode
***********************************************************************/
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull)
{
isNull = isNull || fResult.strVal.isNull(); // XXX: NullString returns isNull, we should remove that parameter altogether.
isNull = isNull ||
fResult.strVal
.isNull(); // XXX: NullString returns isNull, we should remove that parameter altogether.
return fResult.strVal;
}
virtual int64_t getIntVal(rowgroup::Row& row, bool& isNull)
@ -475,19 +477,20 @@ inline const utils::NullString& TreeNode::getStrVal(const long timeZone)
case CalpontSystemCatalog::VARCHAR:
if (fResultType.colWidth <= 7)
{
const char *intAsChar = (const char*) (&fResult.origIntVal);
const char* intAsChar = (const char*)(&fResult.origIntVal);
fResult.strVal.assign((const uint8_t*)intAsChar, strlen(intAsChar));
}
break;
case CalpontSystemCatalog::CHAR:
case CalpontSystemCatalog::VARBINARY: // XXX: TODO: we don't have varbinary support now, but it may be handled just like varchar.
case CalpontSystemCatalog::VARBINARY: // XXX: TODO: we don't have varbinary support now, but it may be
// handled just like varchar.
case CalpontSystemCatalog::BLOB:
case CalpontSystemCatalog::TEXT:
if (fResultType.colWidth <= 8)
{
const char *intAsChar = (const char*) (&fResult.origIntVal);
const char* intAsChar = (const char*)(&fResult.origIntVal);
fResult.strVal.assign((const uint8_t*)intAsChar, strlen(intAsChar));
}
@ -865,27 +868,27 @@ inline double TreeNode::getDoubleVal()
{
case CalpontSystemCatalog::CHAR:
if (fResultType.colWidth <= 8)
return strtod((char*)(&fResult.origIntVal), NULL);
return strtod((char*)(&fResult.origIntVal), nullptr);
idbassert(fResult.strVal.str());
return strtod(fResult.strVal.str(), NULL);
return strtod(fResult.strVal.str(), nullptr);
case CalpontSystemCatalog::VARCHAR:
if (fResultType.colWidth <= 7)
return strtod((char*)(&fResult.origIntVal), NULL);
return strtod((char*)(&fResult.origIntVal), nullptr);
idbassert(fResult.strVal.str());
return strtod(fResult.strVal.str(), NULL);
return strtod(fResult.strVal.str(), nullptr);
// FIXME: ???
case CalpontSystemCatalog::VARBINARY:
case CalpontSystemCatalog::BLOB:
case CalpontSystemCatalog::TEXT:
if (fResultType.colWidth <= 7)
return strtod((char*)(&fResult.origIntVal), NULL);
return strtod((char*)(&fResult.origIntVal), nullptr);
//idbassert(fResult.strVal.str());
return strtod(fResult.strVal.safeString("").c_str(), NULL);
// idbassert(fResult.strVal.str());
return strtod(fResult.strVal.safeString("").c_str(), nullptr);
case CalpontSystemCatalog::BIGINT:
case CalpontSystemCatalog::TINYINT:
@ -936,27 +939,27 @@ inline long double TreeNode::getLongDoubleVal()
{
case CalpontSystemCatalog::CHAR:
if (fResultType.colWidth <= 8)
return strtold((char*)(&fResult.origIntVal), NULL);
return strtold((char*)(&fResult.origIntVal), nullptr);
idbassert(fResult.strVal.str());
return strtold(fResult.strVal.str(), NULL);
return strtold(fResult.strVal.str(), nullptr);
case CalpontSystemCatalog::VARCHAR:
if (fResultType.colWidth <= 7)
return strtold((char*)(&fResult.origIntVal), NULL);
return strtold((char*)(&fResult.origIntVal), nullptr);
idbassert(fResult.strVal.str());
return strtold(fResult.strVal.str(), NULL);
return strtold(fResult.strVal.str(), nullptr);
// FIXME: ???
case CalpontSystemCatalog::VARBINARY:
case CalpontSystemCatalog::BLOB:
case CalpontSystemCatalog::TEXT:
if (fResultType.colWidth <= 7)
return strtold((char*)(&fResult.origIntVal), NULL);
return strtold((char*)(&fResult.origIntVal), nullptr);
idbassert(fResult.strVal.str());
return strtold(fResult.strVal.str(), NULL);
return strtold(fResult.strVal.str(), nullptr);
case CalpontSystemCatalog::BIGINT:
case CalpontSystemCatalog::TINYINT:

View File

@ -50,14 +50,14 @@ class TreeNodeImpl : public TreeNode
* Constructors
*/
TreeNodeImpl();
TreeNodeImpl(const std::string& sql);
explicit TreeNodeImpl(const std::string& sql);
// not needed yet
// TreeNodeImpl(const TreeNodeImpl& rhs);
/**
* Destructors
*/
virtual ~TreeNodeImpl();
~TreeNodeImpl() override;
/**
* Accessor Methods
*/
@ -65,13 +65,13 @@ class TreeNodeImpl : public TreeNode
/**
* Operations
*/
virtual const std::string toString() const override;
const std::string toString() const override;
virtual const std::string data() const override
const std::string data() const override
{
return fData;
}
virtual void data(const std::string data) override
void data(const std::string data) override
{
fData = data;
}
@ -80,7 +80,7 @@ class TreeNodeImpl : public TreeNode
*
* deep copy of this pointer and return the copy
*/
inline virtual TreeNodeImpl* clone() const override
inline TreeNodeImpl* clone() const override
{
return new TreeNodeImpl(*this);
}
@ -88,15 +88,15 @@ class TreeNodeImpl : public TreeNode
/**
* The serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -110,7 +110,7 @@ class TreeNodeImpl : public TreeNode
* Do a deep, strict (as opposed to semantic) equivalence test.
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -119,7 +119,8 @@ class TreeNodeImpl : public TreeNode
*/
bool operator!=(const TreeNodeImpl& t) const;
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
private:
// default okay
// TreeNodeImpl& operator=(const TreeNodeImpl& rhs);

View File

@ -48,25 +48,25 @@ class UDAFColumn : public AggregateColumn
*/
UDAFColumn();
UDAFColumn(const uint32_t sessionID);
explicit UDAFColumn(const uint32_t sessionID);
UDAFColumn(const UDAFColumn& rhs, const uint32_t sessionID = 0);
/**
* Destructors
*/
virtual ~UDAFColumn();
~UDAFColumn() override;
/**
* Overloaded stream operator
*/
virtual const std::string toString() const override;
const std::string toString() const override;
/** return a copy of this pointer
*
* deep copy of this pointer and return the copy
*/
virtual UDAFColumn* clone() const override
UDAFColumn* clone() const override
{
return new UDAFColumn(*this);
}
@ -82,8 +82,8 @@ class UDAFColumn : public AggregateColumn
/**
* Serialize interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -91,7 +91,7 @@ class UDAFColumn : public AggregateColumn
* @return true iff every member of t is a duplicate copy of every member of this;
* false otherwise
*/
virtual bool operator==(const TreeNode* t) const override;
bool operator==(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -108,7 +108,7 @@ class UDAFColumn : public AggregateColumn
* @return false iff every member of t is a duplicate copy of every member of this;
* true otherwise
*/
virtual bool operator!=(const TreeNode* t) const override;
bool operator!=(const TreeNode* t) const override;
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
*
@ -119,7 +119,7 @@ class UDAFColumn : public AggregateColumn
using AggregateColumn::operator!=;
virtual bool operator!=(const UDAFColumn& t) const;
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
private:
mcsv1sdk::mcsv1Context context;

View File

@ -43,15 +43,11 @@ enum WF_FRAME
struct WF_Boundary
{
WF_Boundary()
{
}
WF_Boundary(WF_FRAME frame) : fFrame(frame)
{
}
~WF_Boundary()
WF_Boundary() = default;
explicit WF_Boundary(WF_FRAME frame) : fFrame(frame)
{
}
~WF_Boundary() = default;
const std::string toString() const;
void serialize(messageqcpp::ByteStream&) const;
void unserialize(messageqcpp::ByteStream&);
@ -67,9 +63,7 @@ struct WF_Frame
fStart.fFrame = WF_UNBOUNDED_PRECEDING;
fEnd.fFrame = WF_UNBOUNDED_FOLLOWING;
}
~WF_Frame()
{
}
~WF_Frame() = default;
const std::string toString() const;
void serialize(messageqcpp::ByteStream&) const;
void unserialize(messageqcpp::ByteStream&);
@ -83,13 +77,11 @@ struct WF_Frame
*/
struct WF_OrderBy
{
WF_OrderBy()
WF_OrderBy() = default;
explicit WF_OrderBy(std::vector<SRCP> orders) : fOrders(orders)
{
}
WF_OrderBy(std::vector<SRCP> orders) : fOrders(orders)
{
}
~WF_OrderBy(){};
~WF_OrderBy() = default;
const std::string toString() const;
void serialize(messageqcpp::ByteStream&) const;
void unserialize(messageqcpp::ByteStream&);

View File

@ -54,14 +54,12 @@ class WindowFunctionColumn : public ReturnedColumn
{
public:
WindowFunctionColumn();
WindowFunctionColumn(const std::string& functionName, const uint32_t sessionID = 0);
explicit WindowFunctionColumn(const std::string& functionName, const uint32_t sessionID = 0);
WindowFunctionColumn(const std::string& functionName, const std::vector<SRCP>& functionParms,
const std::vector<SRCP>& partitions, WF_OrderBy& orderby,
const uint32_t sessionID = 0);
WindowFunctionColumn(const WindowFunctionColumn& rhs, const uint32_t sessionID = 0);
virtual ~WindowFunctionColumn()
{
}
~WindowFunctionColumn() override = default;
/** get function name */
inline const std::string& functionName() const
@ -112,7 +110,7 @@ class WindowFunctionColumn : public ReturnedColumn
}
/** make a clone of this window function */
inline virtual WindowFunctionColumn* clone() const override
inline WindowFunctionColumn* clone() const override
{
return new WindowFunctionColumn(*this);
}
@ -122,22 +120,22 @@ class WindowFunctionColumn : public ReturnedColumn
/** output the function for debug purpose */
const std::string toString() const override;
virtual std::string toCppCode(IncludeSet& includes) const override;
std::string toCppCode(IncludeSet& includes) const override;
/**
* The serialization interface
*/
virtual void serialize(messageqcpp::ByteStream&) const override;
virtual void unserialize(messageqcpp::ByteStream&) override;
void serialize(messageqcpp::ByteStream&) const override;
void unserialize(messageqcpp::ByteStream&) override;
// util function for connector to use.
void addToPartition(std::vector<SRCP>& groupByList);
using ReturnedColumn::hasAggregate;
virtual bool hasAggregate() override
bool hasAggregate() override
{
return false;
}
virtual bool hasWindowFunc() override;
bool hasWindowFunc() override;
void adjustResultType();
// UDAnF support
@ -170,12 +168,12 @@ class WindowFunctionColumn : public ReturnedColumn
WF_OrderBy fOrderBy; /// order by clause
// not support for window functions for now.
virtual bool operator==(const TreeNode* t) const override
bool operator==(const TreeNode* t) const override
{
return false;
}
bool operator==(const WindowFunctionColumn& t) const;
virtual bool operator!=(const TreeNode* t) const override
bool operator!=(const TreeNode* t) const override
{
return false;
}
@ -190,7 +188,7 @@ class WindowFunctionColumn : public ReturnedColumn
***********************************************************/
public:
using TreeNode::getStrVal;
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
{
bool localIsNull = false;
evaluate(row, localIsNull);
@ -198,57 +196,57 @@ class WindowFunctionColumn : public ReturnedColumn
return localIsNull ? fResult.strVal.dropString() : TreeNode::getStrVal(fTimeZone);
}
virtual int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getIntVal();
}
virtual uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override
uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getUintVal();
}
virtual float getFloatVal(rowgroup::Row& row, bool& isNull) override
float getFloatVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getFloatVal();
}
virtual double getDoubleVal(rowgroup::Row& row, bool& isNull) override
double getDoubleVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getDoubleVal();
}
virtual long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override
long double getLongDoubleVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getLongDoubleVal();
}
virtual IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override
IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getDecimalVal();
}
virtual int32_t getDateIntVal(rowgroup::Row& row, bool& isNull) override
int32_t getDateIntVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getDateIntVal();
}
virtual int64_t getDatetimeIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getDatetimeIntVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getDatetimeIntVal();
}
virtual int64_t getTimestampIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getTimestampIntVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getTimestampIntVal();
}
virtual int64_t getTimeIntVal(rowgroup::Row& row, bool& isNull) override
int64_t getTimeIntVal(rowgroup::Row& row, bool& isNull) override
{
evaluate(row, isNull);
return TreeNode::getTimeIntVal();