1
0
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:
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

@ -41,105 +41,132 @@ namespace primitiveprocessor
class ColumnCommand : public Command
{
public:
ColumnCommand();
virtual ~ColumnCommand();
ColumnCommand();
virtual ~ColumnCommand();
inline uint64_t getLBID() { return lbid; }
inline uint8_t getWidth() { return colType.colWidth; }
inline uint8_t getScale() { return colType.scale; }
uint16_t getFilterCount() { return filterCount; }
const execplan::CalpontSystemCatalog::ColType& getColType() { return colType; }
inline uint64_t getLBID()
{
return lbid;
}
inline uint8_t getWidth()
{
return colType.colWidth;
}
inline uint8_t getScale()
{
return colType.scale;
}
uint16_t getFilterCount()
{
return filterCount;
}
const execplan::CalpontSystemCatalog::ColType& getColType()
{
return colType;
}
void execute();
void execute(int64_t *vals); //used by RTSCommand to redirect values
void prep(int8_t outputType, bool makeAbsRids);
void project();
void projectIntoRowGroup(rowgroup::RowGroup &rg, uint32_t pos);
void nextLBID();
bool isScan() { return _isScan; }
void createCommand(messageqcpp::ByteStream &);
void resetCommand(messageqcpp::ByteStream &);
void setMakeAbsRids(bool m) { makeAbsRids = m; }
bool willPrefetch();
const uint64_t getEmptyRowValue( const execplan::CalpontSystemCatalog::ColDataType dataType, const int width ) const;
const int64_t getLastLbid();
void getLBIDList(uint32_t loopCount, std::vector<int64_t> *lbids);
void execute();
void execute(int64_t* vals); //used by RTSCommand to redirect values
void prep(int8_t outputType, bool makeAbsRids);
void project();
void projectIntoRowGroup(rowgroup::RowGroup& rg, uint32_t pos);
void nextLBID();
bool isScan()
{
return _isScan;
}
void createCommand(messageqcpp::ByteStream&);
void resetCommand(messageqcpp::ByteStream&);
void setMakeAbsRids(bool m)
{
makeAbsRids = m;
}
bool willPrefetch();
const uint64_t getEmptyRowValue( const execplan::CalpontSystemCatalog::ColDataType dataType, const int width ) const;
const int64_t getLastLbid();
void getLBIDList(uint32_t loopCount, std::vector<int64_t>* lbids);
virtual SCommand duplicate();
bool operator==(const ColumnCommand &) const;
bool operator!=(const ColumnCommand &) const;
virtual SCommand duplicate();
bool operator==(const ColumnCommand&) const;
bool operator!=(const ColumnCommand&) const;
/* OR hacks */
void setScan(bool b) { _isScan = b; }
void disableFilters();
void enableFilters();
/* OR hacks */
void setScan(bool b)
{
_isScan = b;
}
void disableFilters();
void enableFilters();
int getCompType() const { return colType.compressionType; }
int getCompType() const
{
return colType.compressionType;
}
protected:
virtual void loadData();
void duplicate(ColumnCommand *);
virtual void loadData();
void duplicate(ColumnCommand*);
// we only care about the width and type fields.
//On the PM the rest is uninitialized
execplan::CalpontSystemCatalog::ColType colType;
// we only care about the width and type fields.
//On the PM the rest is uninitialized
execplan::CalpontSystemCatalog::ColType colType;
private:
ColumnCommand(const ColumnCommand &);
ColumnCommand& operator=(const ColumnCommand &);
ColumnCommand(const ColumnCommand&);
ColumnCommand& operator=(const ColumnCommand&);
void _execute();
void issuePrimitive();
void processResult();
void process_OT_BOTH();
void process_OT_RID();
void process_OT_DATAVALUE();
void process_OT_ROWGROUP();
void projectResult();
void projectResultRG(rowgroup::RowGroup &rg, uint32_t pos);
void removeRowsFromRowGroup(rowgroup::RowGroup &);
void makeScanMsg();
void makeStepMsg();
void setLBID(uint64_t rid);
void _execute();
void issuePrimitive();
void processResult();
void process_OT_BOTH();
void process_OT_RID();
void process_OT_DATAVALUE();
void process_OT_ROWGROUP();
void projectResult();
void projectResultRG(rowgroup::RowGroup& rg, uint32_t pos);
void removeRowsFromRowGroup(rowgroup::RowGroup&);
void makeScanMsg();
void makeStepMsg();
void setLBID(uint64_t rid);
bool _isScan;
bool _isScan;
boost::scoped_array<uint8_t> inputMsg;
NewColRequestHeader *primMsg;
NewColResultHeader *outMsg;
boost::scoped_array<uint8_t> inputMsg;
NewColRequestHeader* primMsg;
NewColResultHeader* outMsg;
// the length of base prim msg, which is everything up to the
// rid array for the pCol message
uint32_t baseMsgLength;
// the length of base prim msg, which is everything up to the
// rid array for the pCol message
uint32_t baseMsgLength;
uint64_t lbid;
uint32_t traceFlags; // probably move this to Command
uint8_t BOP;
messageqcpp::ByteStream filterString;
uint16_t filterCount;
bool makeAbsRids;
int64_t *values; // this is usually bpp->values; RTSCommand needs to use a different container
uint64_t lbid;
uint32_t traceFlags; // probably move this to Command
uint8_t BOP;
messageqcpp::ByteStream filterString;
uint16_t filterCount;
bool makeAbsRids;
int64_t* values; // this is usually bpp->values; RTSCommand needs to use a different container
uint8_t mask, shift; // vars for the selective block loader
uint8_t mask, shift; // vars for the selective block loader
// counters to decide whether to prefetch or not
uint32_t blockCount, loadCount;
// counters to decide whether to prefetch or not
uint32_t blockCount, loadCount;
boost::shared_ptr<primitives::ParsedColumnFilter> parsedColumnFilter;
boost::shared_ptr<primitives::ParsedColumnFilter> parsedColumnFilter;
/* OR hacks */
boost::shared_ptr<primitives::ParsedColumnFilter> emptyFilter;
bool suppressFilter;
/* OR hacks */
boost::shared_ptr<primitives::ParsedColumnFilter> emptyFilter;
bool suppressFilter;
std::vector<uint64_t> lastLbid;
std::vector<uint64_t> lastLbid;
/* speculative optimizations for projectintorowgroup() */
rowgroup::Row r;
uint32_t rowSize;
/* speculative optimizations for projectintorowgroup() */
rowgroup::Row r;
uint32_t rowSize;
bool wasVersioned;
bool wasVersioned;
friend class RTSCommand;
friend class RTSCommand;
};
}