You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
clang format apply
This commit is contained in:
@ -38,24 +38,21 @@ using namespace joblist;
|
||||
|
||||
namespace execplan
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructors/Destructors
|
||||
*/
|
||||
GroupConcatColumn::GroupConcatColumn():
|
||||
AggregateColumn()
|
||||
GroupConcatColumn::GroupConcatColumn() : AggregateColumn()
|
||||
{
|
||||
}
|
||||
|
||||
GroupConcatColumn::GroupConcatColumn(const uint32_t sessionID):
|
||||
AggregateColumn(sessionID)
|
||||
GroupConcatColumn::GroupConcatColumn(const uint32_t sessionID) : AggregateColumn(sessionID)
|
||||
{
|
||||
}
|
||||
|
||||
GroupConcatColumn::GroupConcatColumn(const GroupConcatColumn& rhs, const uint32_t sessionID):
|
||||
AggregateColumn(dynamic_cast<const AggregateColumn&>(rhs)),
|
||||
fOrderCols(rhs.fOrderCols),
|
||||
fSeparator(rhs.fSeparator)
|
||||
GroupConcatColumn::GroupConcatColumn(const GroupConcatColumn& rhs, const uint32_t sessionID)
|
||||
: AggregateColumn(dynamic_cast<const AggregateColumn&>(rhs))
|
||||
, fOrderCols(rhs.fOrderCols)
|
||||
, fSeparator(rhs.fSeparator)
|
||||
{
|
||||
}
|
||||
|
||||
@ -69,110 +66,110 @@ GroupConcatColumn::~GroupConcatColumn()
|
||||
|
||||
const string GroupConcatColumn::toString() const
|
||||
{
|
||||
ostringstream output;
|
||||
output << "GroupConcatColumn " << data() << endl;
|
||||
output << AggregateColumn::toString() << endl;
|
||||
output << "Group Concat Order Columns: " << endl;
|
||||
ostringstream output;
|
||||
output << "GroupConcatColumn " << data() << endl;
|
||||
output << AggregateColumn::toString() << endl;
|
||||
output << "Group Concat Order Columns: " << endl;
|
||||
|
||||
for (uint32_t i = 0; i < fOrderCols.size(); i++)
|
||||
{
|
||||
output << *fOrderCols[i];
|
||||
}
|
||||
for (uint32_t i = 0; i < fOrderCols.size(); i++)
|
||||
{
|
||||
output << *fOrderCols[i];
|
||||
}
|
||||
|
||||
output << "\nSeparator: " << fSeparator << endl;
|
||||
return output.str();
|
||||
output << "\nSeparator: " << fSeparator << endl;
|
||||
return output.str();
|
||||
}
|
||||
|
||||
ostream& operator<<(ostream& output, const GroupConcatColumn& rhs)
|
||||
{
|
||||
output << rhs.toString();
|
||||
return output;
|
||||
output << rhs.toString();
|
||||
return output;
|
||||
}
|
||||
|
||||
void GroupConcatColumn::serialize(messageqcpp::ByteStream& b) const
|
||||
{
|
||||
b << (uint8_t) ObjectReader::GROUPCONCATCOLUMN;
|
||||
AggregateColumn::serialize(b);
|
||||
b << (uint8_t)ObjectReader::GROUPCONCATCOLUMN;
|
||||
AggregateColumn::serialize(b);
|
||||
|
||||
CalpontSelectExecutionPlan::ReturnedColumnList::const_iterator rcit;
|
||||
b << static_cast<uint32_t>(fOrderCols.size());
|
||||
CalpontSelectExecutionPlan::ReturnedColumnList::const_iterator rcit;
|
||||
b << static_cast<uint32_t>(fOrderCols.size());
|
||||
|
||||
for (rcit = fOrderCols.begin(); rcit != fOrderCols.end(); ++rcit)
|
||||
(*rcit)->serialize(b);
|
||||
for (rcit = fOrderCols.begin(); rcit != fOrderCols.end(); ++rcit)
|
||||
(*rcit)->serialize(b);
|
||||
|
||||
b << fSeparator;
|
||||
b << fSeparator;
|
||||
}
|
||||
|
||||
void GroupConcatColumn::unserialize(messageqcpp::ByteStream& b)
|
||||
{
|
||||
ObjectReader::checkType(b, ObjectReader::GROUPCONCATCOLUMN);
|
||||
AggregateColumn::unserialize(b);
|
||||
fOrderCols.erase(fOrderCols.begin(), fOrderCols.end());
|
||||
ObjectReader::checkType(b, ObjectReader::GROUPCONCATCOLUMN);
|
||||
AggregateColumn::unserialize(b);
|
||||
fOrderCols.erase(fOrderCols.begin(), fOrderCols.end());
|
||||
|
||||
uint32_t size, i;
|
||||
ReturnedColumn* rc;
|
||||
b >> size;
|
||||
uint32_t size, i;
|
||||
ReturnedColumn* rc;
|
||||
b >> size;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
rc = dynamic_cast<ReturnedColumn*>(ObjectReader::createTreeNode(b));
|
||||
SRCP srcp(rc);
|
||||
fOrderCols.push_back(srcp);
|
||||
}
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
rc = dynamic_cast<ReturnedColumn*>(ObjectReader::createTreeNode(b));
|
||||
SRCP srcp(rc);
|
||||
fOrderCols.push_back(srcp);
|
||||
}
|
||||
|
||||
b >> fSeparator;
|
||||
b >> fSeparator;
|
||||
}
|
||||
|
||||
bool GroupConcatColumn::operator==(const GroupConcatColumn& t) const
|
||||
{
|
||||
const AggregateColumn* rc1, *rc2;
|
||||
const AggregateColumn *rc1, *rc2;
|
||||
|
||||
rc1 = static_cast<const AggregateColumn*>(this);
|
||||
rc2 = static_cast<const AggregateColumn*>(&t);
|
||||
rc1 = static_cast<const AggregateColumn*>(this);
|
||||
rc2 = static_cast<const AggregateColumn*>(&t);
|
||||
|
||||
if (*rc1 != *rc2)
|
||||
return false;
|
||||
if (*rc1 != *rc2)
|
||||
return false;
|
||||
|
||||
for (uint32_t i = 0; i < fOrderCols.size(); i++)
|
||||
for (uint32_t i = 0; i < fOrderCols.size(); i++)
|
||||
{
|
||||
if (fOrderCols[i].get() != NULL)
|
||||
{
|
||||
if (fOrderCols[i].get() != NULL)
|
||||
{
|
||||
if (t.fOrderCols[i] == NULL)
|
||||
return false;
|
||||
|
||||
if (*(fOrderCols[i].get()) != t.fOrderCols[i].get())
|
||||
return false;
|
||||
}
|
||||
else if (t.fOrderCols[i].get() != NULL)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fSeparator != t.fSeparator)
|
||||
if (t.fOrderCols[i] == NULL)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
if (*(fOrderCols[i].get()) != t.fOrderCols[i].get())
|
||||
return false;
|
||||
}
|
||||
else if (t.fOrderCols[i].get() != NULL)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fSeparator != t.fSeparator)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GroupConcatColumn::operator==(const TreeNode* t) const
|
||||
{
|
||||
const GroupConcatColumn* ac;
|
||||
const GroupConcatColumn* ac;
|
||||
|
||||
ac = dynamic_cast<const GroupConcatColumn*>(t);
|
||||
ac = dynamic_cast<const GroupConcatColumn*>(t);
|
||||
|
||||
if (ac == NULL)
|
||||
return false;
|
||||
if (ac == NULL)
|
||||
return false;
|
||||
|
||||
return *this == *ac;
|
||||
return *this == *ac;
|
||||
}
|
||||
|
||||
bool GroupConcatColumn::operator!=(const GroupConcatColumn& t) const
|
||||
{
|
||||
return !(*this == t);
|
||||
return !(*this == t);
|
||||
}
|
||||
|
||||
bool GroupConcatColumn::operator!=(const TreeNode* t) const
|
||||
{
|
||||
return !(*this == t);
|
||||
return !(*this == t);
|
||||
}
|
||||
|
||||
} // namespace execplan
|
||||
} // namespace execplan
|
||||
|
Reference in New Issue
Block a user