1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-05 16:15:50 +03:00

clang format apply

This commit is contained in:
Leonid Fedorov
2022-02-11 12:24:40 +00:00
parent 509f005be7
commit 7c808317dc
1367 changed files with 394342 additions and 413129 deletions

View File

@@ -17,7 +17,6 @@
// $Id: windowfunction.h 3932 2013-06-25 16:08:10Z xlou $
#ifndef UTILS_WINDOWFUNCTION_H
#define UTILS_WINDOWFUNCTION_H
@@ -34,93 +33,84 @@ namespace ordering
// forward reference
class EqualCompData;
class OrderByData;
};
}; // namespace ordering
namespace windowfunction
{
// forward reference
class WindowFunctionType;
class WindowFrame;
/** @brief class WindowFunction
*
*/
class WindowFunction
{
public:
/** @brief WindowFunction constructor
* @param f: shared pointer to a WindowFuncitonType
* @param p: shared pointer to equal compare functor
* @param o: shared pointer to order by functor
* @param w: shared pointer to window specification
* @param r: row meta data
*/
WindowFunction(boost::shared_ptr<WindowFunctionType>& f,
boost::shared_ptr<ordering::EqualCompData>& p,
boost::shared_ptr<ordering::OrderByData>& o,
boost::shared_ptr<WindowFrame>& w,
const rowgroup::RowGroup& g,
const rowgroup::Row& r);
public:
/** @brief WindowFunction constructor
* @param f: shared pointer to a WindowFuncitonType
* @param p: shared pointer to equal compare functor
* @param o: shared pointer to order by functor
* @param w: shared pointer to window specification
* @param r: row meta data
*/
WindowFunction(boost::shared_ptr<WindowFunctionType>& f, boost::shared_ptr<ordering::EqualCompData>& p,
boost::shared_ptr<ordering::OrderByData>& o, boost::shared_ptr<WindowFrame>& w,
const rowgroup::RowGroup& g, const rowgroup::Row& r);
/** @brief WindowFunction destructor
*/
virtual ~WindowFunction();
/** @brief WindowFunction destructor
*/
virtual ~WindowFunction();
/** @brief virtual void Run method
*/
void operator()();
/** @brief virtual void Run method
*/
void operator()();
const std::string toString() const;
const std::string toString() const;
void setCallback(joblist::WindowFunctionStep*, int);
const rowgroup::Row& getRow() const;
void setCallback(joblist::WindowFunctionStep*, int);
const rowgroup::Row& getRow() const;
protected:
// cancellable sort function
void sort(std::vector<joblist::RowPosition>::iterator, uint64_t);
protected:
// special window frames
void processUnboundedWindowFrame1();
void processUnboundedWindowFrame2();
void processUnboundedWindowFrame3();
void processExprWindowFrame();
// cancellable sort function
void sort(std::vector<joblist::RowPosition>::iterator, uint64_t);
// for string table
rowgroup::Row::Pointer getPointer(joblist::RowPosition& r)
{
return fStep->getPointer(r, fRowGroup, fRow);
}
// special window frames
void processUnboundedWindowFrame1();
void processUnboundedWindowFrame2();
void processUnboundedWindowFrame3();
void processExprWindowFrame();
// function type
boost::shared_ptr<WindowFunctionType> fFunctionType;
// for string table
rowgroup::Row::Pointer getPointer(joblist::RowPosition& r)
{
return fStep->getPointer(r, fRowGroup, fRow);
}
// window clause
boost::shared_ptr<ordering::EqualCompData> fPartitionBy;
boost::shared_ptr<ordering::OrderByData> fOrderBy;
boost::shared_ptr<WindowFrame> fFrame;
std::vector<std::pair<int64_t, int64_t> > fPartition;
// function type
boost::shared_ptr<WindowFunctionType> fFunctionType;
// data
boost::shared_ptr<std::vector<joblist::RowPosition> > fRowData;
// window clause
boost::shared_ptr<ordering::EqualCompData> fPartitionBy;
boost::shared_ptr<ordering::OrderByData> fOrderBy;
boost::shared_ptr<WindowFrame> fFrame;
std::vector<std::pair<int64_t, int64_t> > fPartition;
// row meta data
rowgroup::RowGroup fRowGroup;
rowgroup::Row fRow;
// data
boost::shared_ptr<std::vector<joblist::RowPosition> > fRowData;
// pointer back to step
joblist::WindowFunctionStep* fStep;
int fId;
// row meta data
rowgroup::RowGroup fRowGroup;
rowgroup::Row fRow;
// pointer back to step
joblist::WindowFunctionStep* fStep;
int fId;
friend class joblist::WindowFunctionStep;
friend class joblist::WindowFunctionStep;
};
} // namespace
} // namespace windowfunction
#endif // UTILS_WINDOWFUNCTION_H