1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Reformat all code to coding standard

This commit is contained in:
Andrew Hutchings
2017-10-26 17:18:17 +01:00
parent 4985f3456e
commit 01446d1e22
1296 changed files with 403852 additions and 353747 deletions

View File

@ -45,24 +45,38 @@ namespace joblist
/* I think this class literally does nothing */
PassThruCommandJL::PassThruCommandJL(const PassThruStep &p)
PassThruCommandJL::PassThruCommandJL(const PassThruStep& p)
{
OID = p.oid();
colName = p.name();
colWidth = p.colWidth;
OID = p.oid();
colName = p.name();
colWidth = p.colWidth;
// cout << "PassThru col width = " << (int) colWidth << " for OID " << OID << endl;
/* Is this ever a dictionary column? */
if (p.isDictColumn)
tableColumnType = TableColumn::STRING;
else
switch (colWidth) {
case 1: tableColumnType = TableColumn::UINT8; break;
case 2: tableColumnType = TableColumn::UINT16; break;
case 4: tableColumnType = TableColumn::UINT32; break;
case 8: tableColumnType = TableColumn::UINT64; break;
default:
throw logic_error("PassThruCommandJL(): bad column width?");
}
/* Is this ever a dictionary column? */
if (p.isDictColumn)
tableColumnType = TableColumn::STRING;
else
switch (colWidth)
{
case 1:
tableColumnType = TableColumn::UINT8;
break;
case 2:
tableColumnType = TableColumn::UINT16;
break;
case 4:
tableColumnType = TableColumn::UINT32;
break;
case 8:
tableColumnType = TableColumn::UINT64;
break;
default:
throw logic_error("PassThruCommandJL(): bad column width?");
}
}
PassThruCommandJL::~PassThruCommandJL()
@ -73,33 +87,33 @@ void PassThruCommandJL::setLBID(uint64_t l, uint32_t dbroot)
{
}
void PassThruCommandJL::createCommand(ByteStream &bs) const
void PassThruCommandJL::createCommand(ByteStream& bs) const
{
bs << (uint8_t) PASS_THRU;
bs << colWidth;
CommandJL::createCommand(bs);
bs << (uint8_t) PASS_THRU;
bs << colWidth;
CommandJL::createCommand(bs);
}
void PassThruCommandJL::runCommand(ByteStream &bs) const
void PassThruCommandJL::runCommand(ByteStream& bs) const
{
}
uint8_t PassThruCommandJL::getTableColumnType()
{
return tableColumnType;
return tableColumnType;
}
string PassThruCommandJL::toString()
{
ostringstream oss;
oss << "PassThruCommandJL: colwidth=" << static_cast<uint32_t>(colWidth) << " oid=" << OID
<< " colName=" << colName;
return oss.str();
ostringstream oss;
oss << "PassThruCommandJL: colwidth=" << static_cast<uint32_t>(colWidth) << " oid=" << OID
<< " colName=" << colName;
return oss.str();
}
uint16_t PassThruCommandJL::getWidth()
{
return colWidth;
return colWidth;
}
};