1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +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

@ -35,74 +35,93 @@ typedef boost::shared_ptr<Command> SCommand;
class Command
{
public:
enum CommandType {
NONE,
COLUMN_COMMAND,
DICT_STEP,
DICT_SCAN,
PASS_THRU,
RID_TO_STRING,
FILTER_COMMAND,
enum CommandType
{
NONE,
COLUMN_COMMAND,
DICT_STEP,
DICT_SCAN,
PASS_THRU,
RID_TO_STRING,
FILTER_COMMAND,
PSEUDOCOLUMN
};
};
static const uint8_t NOT_FEEDER = 0;
static const uint8_t FILT_FEEDER = 1;
static const uint8_t LEFT_FEEDER = 3;
static const uint8_t RIGHT_FEEDER = 5;
static const uint8_t NOT_FEEDER = 0;
static const uint8_t FILT_FEEDER = 1;
static const uint8_t LEFT_FEEDER = 3;
static const uint8_t RIGHT_FEEDER = 5;
Command(CommandType c);
virtual ~Command();
Command(CommandType c);
virtual ~Command();
virtual void execute() = 0;
virtual void project() = 0;
virtual void projectIntoRowGroup(rowgroup::RowGroup &rg, uint32_t columnPosition) = 0;
virtual uint64_t getLBID() = 0;
virtual void getLBIDList(uint32_t loopCount, std::vector<int64_t> *out) {} // the default fcn returns 0 lbids
virtual void nextLBID() = 0;
virtual void createCommand(messageqcpp::ByteStream &);
virtual void resetCommand(messageqcpp::ByteStream &);
virtual void execute() = 0;
virtual void project() = 0;
virtual void projectIntoRowGroup(rowgroup::RowGroup& rg, uint32_t columnPosition) = 0;
virtual uint64_t getLBID() = 0;
virtual void getLBIDList(uint32_t loopCount, std::vector<int64_t>* out) {} // the default fcn returns 0 lbids
virtual void nextLBID() = 0;
virtual void createCommand(messageqcpp::ByteStream&);
virtual void resetCommand(messageqcpp::ByteStream&);
/* Duplicate() makes a copy of this object as constructed by createCommand().
It's thread-safe */
virtual SCommand duplicate() = 0;
bool operator==(const Command &) const;
bool operator!=(const Command& c) const { return !(*this == c); }
/* Duplicate() makes a copy of this object as constructed by createCommand().
It's thread-safe */
virtual SCommand duplicate() = 0;
bool operator==(const Command&) const;
bool operator!=(const Command& c) const
{
return !(*this == c);
}
/* Put bootstrap code here (ie, build the template primitive msg) */
virtual void prep(int8_t outputType, bool makeAbsRids) = 0;
virtual void setBatchPrimitiveProcessor(BatchPrimitiveProcessor *);
virtual void setMakeAbsRids(bool);
/* Put bootstrap code here (ie, build the template primitive msg) */
virtual void prep(int8_t outputType, bool makeAbsRids) = 0;
virtual void setBatchPrimitiveProcessor(BatchPrimitiveProcessor*);
virtual void setMakeAbsRids(bool);
CommandType getCommandType() const { return cmdType; }
CommandType getCommandType() const
{
return cmdType;
}
// if feeding a filtercommand
// note: a filtercommand itself can feed another filtercommand
uint8_t filterFeeder() { return fFilterFeeder; }
void filterFeeder(uint8_t f) { fFilterFeeder = f; }
virtual void copyRidsForFilterCmd();
// if feeding a filtercommand
// note: a filtercommand itself can feed another filtercommand
uint8_t filterFeeder()
{
return fFilterFeeder;
}
void filterFeeder(uint8_t f)
{
fFilterFeeder = f;
}
virtual void copyRidsForFilterCmd();
static Command* makeCommand(messageqcpp::ByteStream&, CommandType*, std::vector<SCommand>&);
static Command* makeCommand(messageqcpp::ByteStream&, CommandType*, std::vector<SCommand>&);
uint32_t getOID() const { return OID; }
uint32_t getTupleKey() const { return tupleKey; }
uint32_t getOID() const
{
return OID;
}
uint32_t getTupleKey() const
{
return tupleKey;
}
virtual int getCompType() const=0;
virtual int getCompType() const = 0;
protected:
BatchPrimitiveProcessor *bpp;
CommandType cmdType;
uint8_t fFilterFeeder;
uint32_t OID;
uint32_t tupleKey;
boost::uuids::uuid queryUuid;
boost::uuids::uuid stepUuid;
BatchPrimitiveProcessor* bpp;
CommandType cmdType;
uint8_t fFilterFeeder;
uint32_t OID;
uint32_t tupleKey;
boost::uuids::uuid queryUuid;
boost::uuids::uuid stepUuid;
void duplicate(Command *);
void duplicate(Command*);
private:
Command();
Command(const Command &);
Command();
Command(const Command&);
};