You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
Reformat all code to coding standard
This commit is contained in:
@ -37,20 +37,20 @@ namespace execplan
|
||||
* Constructors/Destructors
|
||||
*/
|
||||
ReturnedColumn::ReturnedColumn(): fReturnAll (false),
|
||||
fSessionID(0),
|
||||
fSequence(-1),
|
||||
fCardinality(0),
|
||||
fDistinct(false),
|
||||
fJoinInfo(0),
|
||||
fAsc(true),
|
||||
fNullsFirst(true),
|
||||
fOrderPos((uint64_t)-1),
|
||||
fColSource(0),
|
||||
fColPosition(-1),
|
||||
fHasAggregate(false),
|
||||
fInputIndex(-1),
|
||||
fOutputIndex(-1),
|
||||
fExpressionId ((uint32_t)-1)
|
||||
fSessionID(0),
|
||||
fSequence(-1),
|
||||
fCardinality(0),
|
||||
fDistinct(false),
|
||||
fJoinInfo(0),
|
||||
fAsc(true),
|
||||
fNullsFirst(true),
|
||||
fOrderPos((uint64_t) - 1),
|
||||
fColSource(0),
|
||||
fColPosition(-1),
|
||||
fHasAggregate(false),
|
||||
fInputIndex(-1),
|
||||
fOutputIndex(-1),
|
||||
fExpressionId ((uint32_t) - 1)
|
||||
{
|
||||
}
|
||||
|
||||
@ -63,54 +63,54 @@ ReturnedColumn::ReturnedColumn(const string& sql):
|
||||
fJoinInfo(0),
|
||||
fAsc(true),
|
||||
fNullsFirst(true),
|
||||
fOrderPos((uint64_t)-1),
|
||||
fOrderPos((uint64_t) - 1),
|
||||
fColSource(0),
|
||||
fColPosition(-1),
|
||||
fHasAggregate(false),
|
||||
fData(sql),
|
||||
fInputIndex(-1),
|
||||
fOutputIndex(-1),
|
||||
fExpressionId ((uint32_t)-1)
|
||||
fExpressionId ((uint32_t) - 1)
|
||||
{
|
||||
}
|
||||
|
||||
ReturnedColumn::ReturnedColumn(const uint32_t sessionID, const bool returnAll):
|
||||
fReturnAll(returnAll),
|
||||
fSessionID(sessionID),
|
||||
fSequence(-1),
|
||||
fCardinality(0),
|
||||
fDistinct(false),
|
||||
fJoinInfo(0),
|
||||
fAsc(true),
|
||||
fNullsFirst(true),
|
||||
fOrderPos((uint64_t)-1),
|
||||
fColSource(0),
|
||||
fColPosition(-1),
|
||||
fHasAggregate(false),
|
||||
fInputIndex(-1),
|
||||
fOutputIndex(-1),
|
||||
fExpressionId ((uint32_t)-1)
|
||||
fReturnAll(returnAll),
|
||||
fSessionID(sessionID),
|
||||
fSequence(-1),
|
||||
fCardinality(0),
|
||||
fDistinct(false),
|
||||
fJoinInfo(0),
|
||||
fAsc(true),
|
||||
fNullsFirst(true),
|
||||
fOrderPos((uint64_t) - 1),
|
||||
fColSource(0),
|
||||
fColPosition(-1),
|
||||
fHasAggregate(false),
|
||||
fInputIndex(-1),
|
||||
fOutputIndex(-1),
|
||||
fExpressionId ((uint32_t) - 1)
|
||||
{
|
||||
}
|
||||
|
||||
ReturnedColumn::ReturnedColumn(const ReturnedColumn& rhs, const uint32_t sessionID):
|
||||
TreeNode(rhs),
|
||||
fReturnAll(rhs.fReturnAll),
|
||||
fSessionID(sessionID),
|
||||
fSequence(rhs.fSequence),
|
||||
fCardinality(rhs.fCardinality),
|
||||
fDistinct(rhs.fDistinct),
|
||||
fJoinInfo(rhs.fJoinInfo),
|
||||
fAsc(rhs.fAsc),
|
||||
fNullsFirst(rhs.fNullsFirst),
|
||||
fOrderPos(rhs.fOrderPos),
|
||||
fColSource(rhs.fColSource),
|
||||
fColPosition(rhs.fColPosition),
|
||||
fHasAggregate(rhs.fHasAggregate),
|
||||
fData(rhs.fData),
|
||||
fInputIndex(rhs.fInputIndex),
|
||||
fOutputIndex(rhs.fOutputIndex),
|
||||
fExpressionId (rhs.fExpressionId)
|
||||
TreeNode(rhs),
|
||||
fReturnAll(rhs.fReturnAll),
|
||||
fSessionID(sessionID),
|
||||
fSequence(rhs.fSequence),
|
||||
fCardinality(rhs.fCardinality),
|
||||
fDistinct(rhs.fDistinct),
|
||||
fJoinInfo(rhs.fJoinInfo),
|
||||
fAsc(rhs.fAsc),
|
||||
fNullsFirst(rhs.fNullsFirst),
|
||||
fOrderPos(rhs.fOrderPos),
|
||||
fColSource(rhs.fColSource),
|
||||
fColPosition(rhs.fColPosition),
|
||||
fHasAggregate(rhs.fHasAggregate),
|
||||
fData(rhs.fData),
|
||||
fInputIndex(rhs.fInputIndex),
|
||||
fOutputIndex(rhs.fOutputIndex),
|
||||
fExpressionId (rhs.fExpressionId)
|
||||
{
|
||||
}
|
||||
|
||||
@ -121,119 +121,131 @@ ReturnedColumn::~ReturnedColumn()
|
||||
/**
|
||||
* ostream function
|
||||
*/
|
||||
ostream& operator<<(ostream &output, const ReturnedColumn &retCol)
|
||||
ostream& operator<<(ostream& output, const ReturnedColumn& retCol)
|
||||
{
|
||||
output << retCol.toString() << endl;
|
||||
return output;
|
||||
output << retCol.toString() << endl;
|
||||
return output;
|
||||
}
|
||||
|
||||
void ReturnedColumn::serialize(messageqcpp::ByteStream& b) const
|
||||
{
|
||||
b << (ObjectReader::id_t) ObjectReader::RETURNEDCOLUMN;
|
||||
b << fData;
|
||||
b << (uint64_t) fCardinality;
|
||||
b << fAlias;
|
||||
b << (uint8_t)fDistinct;
|
||||
b << (uint64_t)fJoinInfo;
|
||||
b << (uint8_t)fAsc;
|
||||
b << (uint8_t)fNullsFirst;
|
||||
b << (uint64_t)fOrderPos;
|
||||
b << (uint64_t)fColSource;
|
||||
b << (int64_t)fColPosition;
|
||||
b << (uint32_t)fInputIndex;
|
||||
b << (uint32_t)fOutputIndex;
|
||||
b << (int32_t)fSequence;
|
||||
b << (uint8_t)fReturnAll;
|
||||
fResultType.serialize(b);
|
||||
fOperationType.serialize(b);
|
||||
b << (uint32_t)fExpressionId;
|
||||
b << (ObjectReader::id_t) ObjectReader::RETURNEDCOLUMN;
|
||||
b << fData;
|
||||
b << (uint64_t) fCardinality;
|
||||
b << fAlias;
|
||||
b << (uint8_t)fDistinct;
|
||||
b << (uint64_t)fJoinInfo;
|
||||
b << (uint8_t)fAsc;
|
||||
b << (uint8_t)fNullsFirst;
|
||||
b << (uint64_t)fOrderPos;
|
||||
b << (uint64_t)fColSource;
|
||||
b << (int64_t)fColPosition;
|
||||
b << (uint32_t)fInputIndex;
|
||||
b << (uint32_t)fOutputIndex;
|
||||
b << (int32_t)fSequence;
|
||||
b << (uint8_t)fReturnAll;
|
||||
fResultType.serialize(b);
|
||||
fOperationType.serialize(b);
|
||||
b << (uint32_t)fExpressionId;
|
||||
}
|
||||
|
||||
void ReturnedColumn::unserialize(messageqcpp::ByteStream& b)
|
||||
{
|
||||
ObjectReader::checkType(b, ObjectReader::RETURNEDCOLUMN);
|
||||
b >> fData;
|
||||
b >> (uint64_t&)fCardinality;
|
||||
b >> fAlias;
|
||||
b >> (uint8_t&)fDistinct;
|
||||
b >> (uint64_t&)fJoinInfo;
|
||||
b >> (uint8_t&)fAsc;
|
||||
b >> (uint8_t&)fNullsFirst;
|
||||
b >> (uint64_t&)fOrderPos;
|
||||
b >> (uint64_t&)fColSource;
|
||||
b >> (int64_t&)fColPosition;
|
||||
b >> (uint32_t&)fInputIndex;
|
||||
b >> (uint32_t&)fOutputIndex;
|
||||
b >> (int32_t&)fSequence;
|
||||
b >> (uint8_t&)fReturnAll;
|
||||
fResultType.unserialize(b);
|
||||
fOperationType.unserialize(b);
|
||||
b >> (uint32_t&)fExpressionId;
|
||||
ObjectReader::checkType(b, ObjectReader::RETURNEDCOLUMN);
|
||||
b >> fData;
|
||||
b >> (uint64_t&)fCardinality;
|
||||
b >> fAlias;
|
||||
b >> (uint8_t&)fDistinct;
|
||||
b >> (uint64_t&)fJoinInfo;
|
||||
b >> (uint8_t&)fAsc;
|
||||
b >> (uint8_t&)fNullsFirst;
|
||||
b >> (uint64_t&)fOrderPos;
|
||||
b >> (uint64_t&)fColSource;
|
||||
b >> (int64_t&)fColPosition;
|
||||
b >> (uint32_t&)fInputIndex;
|
||||
b >> (uint32_t&)fOutputIndex;
|
||||
b >> (int32_t&)fSequence;
|
||||
b >> (uint8_t&)fReturnAll;
|
||||
fResultType.unserialize(b);
|
||||
fOperationType.unserialize(b);
|
||||
b >> (uint32_t&)fExpressionId;
|
||||
}
|
||||
|
||||
bool ReturnedColumn::operator==(const ReturnedColumn& t) const
|
||||
{
|
||||
if (fData != t.fData)
|
||||
return false;
|
||||
if (fCardinality != t.fCardinality)
|
||||
return false;
|
||||
//if (fAlias != t.fAlias)
|
||||
// return false;
|
||||
if (fDistinct != t.fDistinct)
|
||||
return false;
|
||||
if (fJoinInfo != t.fJoinInfo)
|
||||
return false;
|
||||
if (fAsc != t.fAsc)
|
||||
return false;
|
||||
if (fNullsFirst != t.fNullsFirst)
|
||||
return false;
|
||||
//if (fOrderPos != t.fOrderPos)
|
||||
// return false;
|
||||
if (fInputIndex != t.fInputIndex)
|
||||
return false;
|
||||
if (fOutputIndex != t.fOutputIndex)
|
||||
return false;
|
||||
//if (fSequence != t.fSequence)
|
||||
// return false;
|
||||
if (fResultType != t.fResultType)
|
||||
return false;
|
||||
if (fOperationType != t.fOperationType)
|
||||
return false;
|
||||
//if (fExpressionId != t.fExpressionId)
|
||||
// return false;
|
||||
return true;
|
||||
if (fData != t.fData)
|
||||
return false;
|
||||
|
||||
if (fCardinality != t.fCardinality)
|
||||
return false;
|
||||
|
||||
//if (fAlias != t.fAlias)
|
||||
// return false;
|
||||
if (fDistinct != t.fDistinct)
|
||||
return false;
|
||||
|
||||
if (fJoinInfo != t.fJoinInfo)
|
||||
return false;
|
||||
|
||||
if (fAsc != t.fAsc)
|
||||
return false;
|
||||
|
||||
if (fNullsFirst != t.fNullsFirst)
|
||||
return false;
|
||||
|
||||
//if (fOrderPos != t.fOrderPos)
|
||||
// return false;
|
||||
if (fInputIndex != t.fInputIndex)
|
||||
return false;
|
||||
|
||||
if (fOutputIndex != t.fOutputIndex)
|
||||
return false;
|
||||
|
||||
//if (fSequence != t.fSequence)
|
||||
// return false;
|
||||
if (fResultType != t.fResultType)
|
||||
return false;
|
||||
|
||||
if (fOperationType != t.fOperationType)
|
||||
return false;
|
||||
|
||||
//if (fExpressionId != t.fExpressionId)
|
||||
// return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ReturnedColumn::operator==(const TreeNode* t) const
|
||||
{
|
||||
const ReturnedColumn *rc;
|
||||
|
||||
rc = dynamic_cast<const ReturnedColumn*>(t);
|
||||
if (rc == NULL)
|
||||
return false;
|
||||
return *this == *rc;
|
||||
const ReturnedColumn* rc;
|
||||
|
||||
rc = dynamic_cast<const ReturnedColumn*>(t);
|
||||
|
||||
if (rc == NULL)
|
||||
return false;
|
||||
|
||||
return *this == *rc;
|
||||
}
|
||||
|
||||
bool ReturnedColumn::operator!=(const ReturnedColumn& t) const
|
||||
{
|
||||
return !(*this == t);
|
||||
return !(*this == t);
|
||||
}
|
||||
|
||||
bool ReturnedColumn::operator!=(const TreeNode* t) const
|
||||
{
|
||||
return !(*this == t);
|
||||
return !(*this == t);
|
||||
}
|
||||
|
||||
const string ReturnedColumn::data() const
|
||||
{
|
||||
return fData;
|
||||
return fData;
|
||||
}
|
||||
|
||||
const string ReturnedColumn::toString() const
|
||||
{
|
||||
ostringstream oss;
|
||||
oss << ">ReturnedColumn " << fJoinInfo << "<" << endl;
|
||||
return oss.str();
|
||||
ostringstream oss;
|
||||
oss << ">ReturnedColumn " << fJoinInfo << "<" << endl;
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
// All columns that may have simple column added to the list need to implement
|
||||
@ -241,7 +253,7 @@ const string ReturnedColumn::toString() const
|
||||
// fSimpleColumnList will be cleared.
|
||||
void ReturnedColumn::setSimpleColumnList()
|
||||
{
|
||||
fSimpleColumnList.clear();
|
||||
fSimpleColumnList.clear();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user