You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
clang format apply
This commit is contained in:
@@ -17,113 +17,108 @@
|
||||
|
||||
// $Id: windowframe.h 3932 2013-06-25 16:08:10Z xlou $
|
||||
|
||||
|
||||
#ifndef UTILS_WINDOWFRAME_H
|
||||
#define UTILS_WINDOWFRAME_H
|
||||
|
||||
#include <utility> // std::pair, std::make_pair
|
||||
#include <utility> // std::pair, std::make_pair
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "framebound.h"
|
||||
|
||||
namespace windowfunction
|
||||
{
|
||||
|
||||
const int64_t WF__FRAME_ROWS = 0;
|
||||
const int64_t WF__FRAME_ROWS = 0;
|
||||
const int64_t WF__FRAME_RANGE = 1;
|
||||
|
||||
|
||||
/** @brief class WindowFrame
|
||||
*
|
||||
*/
|
||||
class WindowFrame
|
||||
{
|
||||
public:
|
||||
/** @brief WindowFrame constructor
|
||||
*/
|
||||
WindowFrame(int64_t t, boost::shared_ptr<FrameBound>& u, boost::shared_ptr<FrameBound>& l) :
|
||||
fUnit(t), fUpper(u), fLower(l)
|
||||
{}
|
||||
public:
|
||||
/** @brief WindowFrame constructor
|
||||
*/
|
||||
WindowFrame(int64_t t, boost::shared_ptr<FrameBound>& u, boost::shared_ptr<FrameBound>& l)
|
||||
: fUnit(t), fUpper(u), fLower(l)
|
||||
{
|
||||
}
|
||||
|
||||
/** @brief WindowFrame copy constructor
|
||||
*/
|
||||
WindowFrame(const WindowFrame& rhs) :
|
||||
fUnit(rhs.fUnit),
|
||||
fUpper(rhs.fUpper->clone()),
|
||||
fLower(rhs.fLower->clone())
|
||||
{}
|
||||
/** @brief WindowFrame copy constructor
|
||||
*/
|
||||
WindowFrame(const WindowFrame& rhs)
|
||||
: fUnit(rhs.fUnit), fUpper(rhs.fUpper->clone()), fLower(rhs.fLower->clone())
|
||||
{
|
||||
}
|
||||
|
||||
/** @brief WindowFrame destructor
|
||||
*/
|
||||
virtual ~WindowFrame() {};
|
||||
/** @brief WindowFrame destructor
|
||||
*/
|
||||
virtual ~WindowFrame(){};
|
||||
|
||||
/** @brief clone
|
||||
*/
|
||||
virtual WindowFrame* clone()
|
||||
{
|
||||
return new WindowFrame(*this);
|
||||
};
|
||||
/** @brief clone
|
||||
*/
|
||||
virtual WindowFrame* clone()
|
||||
{
|
||||
return new WindowFrame(*this);
|
||||
};
|
||||
|
||||
/** @brief virtual void getWindow
|
||||
*/
|
||||
std::pair<uint64_t, uint64_t> getWindow(int64_t, int64_t, int64_t);
|
||||
/** @brief virtual void getWindow
|
||||
*/
|
||||
std::pair<uint64_t, uint64_t> getWindow(int64_t, int64_t, int64_t);
|
||||
|
||||
const std::string toString() const;
|
||||
const std::string toString() const;
|
||||
|
||||
/** @brief set methods
|
||||
*/
|
||||
void setRowMetaData(const rowgroup::RowGroup& g, const rowgroup::Row& r)
|
||||
{
|
||||
fUpper->setRowMetaData(g, r);
|
||||
fLower->setRowMetaData(g, r);
|
||||
}
|
||||
void setRowData(boost::shared_ptr<std::vector<joblist::RowPosition> >& d)
|
||||
{
|
||||
fUpper->setRowData(d);
|
||||
fLower->setRowData(d);
|
||||
}
|
||||
void setCallback(joblist::WindowFunctionStep* s)
|
||||
{
|
||||
fUpper->setCallback(s);
|
||||
fLower->setCallback(s);
|
||||
}
|
||||
/** @brief set methods
|
||||
*/
|
||||
void setRowMetaData(const rowgroup::RowGroup& g, const rowgroup::Row& r)
|
||||
{
|
||||
fUpper->setRowMetaData(g, r);
|
||||
fLower->setRowMetaData(g, r);
|
||||
}
|
||||
void setRowData(boost::shared_ptr<std::vector<joblist::RowPosition> >& d)
|
||||
{
|
||||
fUpper->setRowData(d);
|
||||
fLower->setRowData(d);
|
||||
}
|
||||
void setCallback(joblist::WindowFunctionStep* s)
|
||||
{
|
||||
fUpper->setCallback(s);
|
||||
fLower->setCallback(s);
|
||||
}
|
||||
|
||||
int64_t unit() const
|
||||
{
|
||||
return fUnit;
|
||||
}
|
||||
void unit(int64_t t)
|
||||
{
|
||||
fUnit = t;
|
||||
}
|
||||
const boost::shared_ptr<FrameBound>& upper() const
|
||||
{
|
||||
return fUpper;
|
||||
}
|
||||
void upper(const boost::shared_ptr<FrameBound>& u)
|
||||
{
|
||||
fUpper = u;
|
||||
}
|
||||
const boost::shared_ptr<FrameBound>& lower() const
|
||||
{
|
||||
return fLower;
|
||||
}
|
||||
void lower(const boost::shared_ptr<FrameBound>& l)
|
||||
{
|
||||
fLower = l;
|
||||
}
|
||||
int64_t unit() const
|
||||
{
|
||||
return fUnit;
|
||||
}
|
||||
void unit(int64_t t)
|
||||
{
|
||||
fUnit = t;
|
||||
}
|
||||
const boost::shared_ptr<FrameBound>& upper() const
|
||||
{
|
||||
return fUpper;
|
||||
}
|
||||
void upper(const boost::shared_ptr<FrameBound>& u)
|
||||
{
|
||||
fUpper = u;
|
||||
}
|
||||
const boost::shared_ptr<FrameBound>& lower() const
|
||||
{
|
||||
return fLower;
|
||||
}
|
||||
void lower(const boost::shared_ptr<FrameBound>& l)
|
||||
{
|
||||
fLower = l;
|
||||
}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
// type
|
||||
int64_t fUnit;
|
||||
|
||||
// type
|
||||
int64_t fUnit;
|
||||
|
||||
// data
|
||||
boost::shared_ptr<FrameBound> fUpper;
|
||||
boost::shared_ptr<FrameBound> fLower;
|
||||
// data
|
||||
boost::shared_ptr<FrameBound> fUpper;
|
||||
boost::shared_ptr<FrameBound> fLower;
|
||||
};
|
||||
|
||||
|
||||
} // namespace
|
||||
} // namespace windowfunction
|
||||
|
||||
#endif // UTILS_WINDOWFRAME_H
|
||||
|
||||
|
Reference in New Issue
Block a user