You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
clang format apply
This commit is contained in:
@ -17,152 +17,133 @@
|
||||
|
||||
// $Id: frameboundrow.h 3868 2013-06-06 22:13:05Z xlou $
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "framebound.h"
|
||||
|
||||
|
||||
namespace windowfunction
|
||||
{
|
||||
|
||||
|
||||
/** @brief class FrameBoundRow
|
||||
*
|
||||
*/
|
||||
class FrameBoundRow : public FrameBound
|
||||
{
|
||||
public:
|
||||
/** @brief FrameBoundRow constructor
|
||||
* @param t, frame type
|
||||
*/
|
||||
FrameBoundRow(int t = 0) : FrameBound(t) {};
|
||||
public:
|
||||
/** @brief FrameBoundRow constructor
|
||||
* @param t, frame type
|
||||
*/
|
||||
FrameBoundRow(int t = 0) : FrameBound(t){};
|
||||
|
||||
/** @brief FrameBoundRow destructor
|
||||
*/
|
||||
virtual ~FrameBoundRow() {};
|
||||
/** @brief FrameBoundRow destructor
|
||||
*/
|
||||
virtual ~FrameBoundRow(){};
|
||||
|
||||
/** @brief clone
|
||||
*/
|
||||
virtual FrameBound* clone()
|
||||
{
|
||||
return new FrameBoundRow(*this);
|
||||
}
|
||||
/** @brief clone
|
||||
*/
|
||||
virtual FrameBound* clone()
|
||||
{
|
||||
return new FrameBoundRow(*this);
|
||||
}
|
||||
|
||||
/** @brief virtual void getBound
|
||||
*/
|
||||
int64_t getBound(int64_t, int64_t, int64_t);
|
||||
/** @brief virtual void getBound
|
||||
*/
|
||||
int64_t getBound(int64_t, int64_t, int64_t);
|
||||
|
||||
const std::string toString() const;
|
||||
|
||||
|
||||
protected:
|
||||
const std::string toString() const;
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
/** @brief class FrameBoundConstantRow
|
||||
*
|
||||
*/
|
||||
class FrameBoundConstantRow : public FrameBoundRow
|
||||
{
|
||||
public:
|
||||
/** @brief FrameBoundConstant constructor
|
||||
* @param t, frame type
|
||||
* @param c, constant value. !! caller need to check NULL or negative value !!
|
||||
*/
|
||||
FrameBoundConstantRow(int t = 0, int c = 0) : FrameBoundRow(t), fOffset(c) {};
|
||||
public:
|
||||
/** @brief FrameBoundConstant constructor
|
||||
* @param t, frame type
|
||||
* @param c, constant value. !! caller need to check NULL or negative value !!
|
||||
*/
|
||||
FrameBoundConstantRow(int t = 0, int c = 0) : FrameBoundRow(t), fOffset(c){};
|
||||
|
||||
/** @brief FrameBoundConstantRow destructor
|
||||
*/
|
||||
virtual ~FrameBoundConstantRow() {};
|
||||
/** @brief FrameBoundConstantRow destructor
|
||||
*/
|
||||
virtual ~FrameBoundConstantRow(){};
|
||||
|
||||
/** @brief clone
|
||||
*/
|
||||
virtual FrameBound* clone()
|
||||
{
|
||||
return new FrameBoundConstantRow(*this);
|
||||
}
|
||||
/** @brief clone
|
||||
*/
|
||||
virtual FrameBound* clone()
|
||||
{
|
||||
return new FrameBoundConstantRow(*this);
|
||||
}
|
||||
|
||||
/** @brief virtual void getBound
|
||||
*/
|
||||
int64_t getBound(int64_t, int64_t, int64_t);
|
||||
/** @brief virtual void getBound
|
||||
*/
|
||||
int64_t getBound(int64_t, int64_t, int64_t);
|
||||
|
||||
const std::string toString() const;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// constant offset
|
||||
int64_t fOffset;
|
||||
const std::string toString() const;
|
||||
|
||||
protected:
|
||||
// constant offset
|
||||
int64_t fOffset;
|
||||
};
|
||||
|
||||
|
||||
/** @brief class FrameBoundExpressionRow
|
||||
*
|
||||
*/
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
class FrameBoundExpressionRow : public FrameBoundConstantRow
|
||||
{
|
||||
public:
|
||||
/** @brief FrameBoundExpressionRow constructor
|
||||
* @param t, frame type
|
||||
*/
|
||||
FrameBoundExpressionRow(int t, uint64_t id = -1, int idx = -1) :
|
||||
FrameBoundConstantRow(t), fExprTupleId(id), fExprIdx(idx) {};
|
||||
public:
|
||||
/** @brief FrameBoundExpressionRow constructor
|
||||
* @param t, frame type
|
||||
*/
|
||||
FrameBoundExpressionRow(int t, uint64_t id = -1, int idx = -1)
|
||||
: FrameBoundConstantRow(t), fExprTupleId(id), fExprIdx(idx){};
|
||||
|
||||
/** @brief FrameBoundExpressionRow destructor
|
||||
*/
|
||||
virtual ~FrameBoundExpressionRow() {};
|
||||
/** @brief FrameBoundExpressionRow destructor
|
||||
*/
|
||||
virtual ~FrameBoundExpressionRow(){};
|
||||
|
||||
/** @brief clone
|
||||
*/
|
||||
virtual FrameBound* clone()
|
||||
{
|
||||
return new FrameBoundExpressionRow<T>(*this);
|
||||
}
|
||||
/** @brief clone
|
||||
*/
|
||||
virtual FrameBound* clone()
|
||||
{
|
||||
return new FrameBoundExpressionRow<T>(*this);
|
||||
}
|
||||
|
||||
/** @brief virtual void getBound
|
||||
*/
|
||||
int64_t getBound(int64_t, int64_t, int64_t);
|
||||
/** @brief virtual void getBound
|
||||
*/
|
||||
int64_t getBound(int64_t, int64_t, int64_t);
|
||||
|
||||
const std::string toString() const;
|
||||
const std::string toString() const;
|
||||
|
||||
void setExprTupleId(int id)
|
||||
{
|
||||
fExprTupleId = id;
|
||||
}
|
||||
uint64_t getExprTupleId() const
|
||||
{
|
||||
return fExprTupleId;
|
||||
}
|
||||
void setExprTupleId(int id)
|
||||
{
|
||||
fExprTupleId = id;
|
||||
}
|
||||
uint64_t getExprTupleId() const
|
||||
{
|
||||
return fExprTupleId;
|
||||
}
|
||||
|
||||
void setExprIndex(int i)
|
||||
{
|
||||
fExprIdx = i;
|
||||
}
|
||||
uint64_t getExprIndex() const
|
||||
{
|
||||
return fExprIdx;
|
||||
}
|
||||
void setExprIndex(int i)
|
||||
{
|
||||
fExprIdx = i;
|
||||
}
|
||||
uint64_t getExprIndex() const
|
||||
{
|
||||
return fExprIdx;
|
||||
}
|
||||
|
||||
protected:
|
||||
void getOffset();
|
||||
|
||||
protected:
|
||||
|
||||
void getOffset();
|
||||
|
||||
// id and index in row
|
||||
uint64_t fExprTupleId;
|
||||
int fExprIdx;
|
||||
|
||||
// id and index in row
|
||||
uint64_t fExprTupleId;
|
||||
int fExprIdx;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
} // namespace windowfunction
|
||||
|
||||
// vim:ts=4 sw=4:
|
||||
|
Reference in New Issue
Block a user