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
Reformat all code to coding standard
This commit is contained in:
@ -40,79 +40,80 @@
|
||||
|
||||
namespace execplan
|
||||
{
|
||||
class FunctionColumn;
|
||||
class ArithmeticColumn;
|
||||
class FunctionColumn;
|
||||
class ArithmeticColumn;
|
||||
}
|
||||
|
||||
namespace funcexp
|
||||
{
|
||||
class Func;
|
||||
|
||||
typedef std::tr1::unordered_map<std::string, Func*> FuncMap;
|
||||
|
||||
class Func;
|
||||
|
||||
typedef std::tr1::unordered_map<std::string, Func*> FuncMap;
|
||||
|
||||
/** @brief FuncExp is a component for evaluate function and expression filters
|
||||
*/
|
||||
class FuncExp {
|
||||
public:
|
||||
|
||||
/** Singleton pattern */
|
||||
static FuncExp* instance();
|
||||
|
||||
/********************************************************************
|
||||
* Row based evaluation APIs
|
||||
********************************************************************/
|
||||
|
||||
/** @brief evaluate a filter stack on row. used for F&E on the where clause
|
||||
*
|
||||
* @param row input row that contains all the columns in the filter stack
|
||||
* @param filters parsetree of filters to evaluate
|
||||
* @return boolean of whether or not the row passed evaluation
|
||||
*/
|
||||
inline bool evaluate(rowgroup::Row& row, execplan::ParseTree* filters);
|
||||
|
||||
/** @brief evaluate a filter stack on rowgroup
|
||||
*
|
||||
* @param row input rowgroup that contains all the columns in the filter stack
|
||||
* @param filters parse tree of filters to evaluate. The failed rows are removed from the rowgroup
|
||||
*/
|
||||
inline void evaluate(rowgroup::RowGroup& rowgroup, execplan::ParseTree* filters);
|
||||
|
||||
/** @brief evaluate a F&E column on row. used for F&E on the select and group by clause
|
||||
*
|
||||
* @param row input row that contains all the columns in all the expressions
|
||||
* @param expressions vector of F&Es that needs evaluation. The results are filled on the row.
|
||||
*/
|
||||
void evaluate(rowgroup::Row& row, std::vector<execplan::SRCP>& expressions);
|
||||
|
||||
/** @brief evaluate a F&E column on rowgroup. used for F&E on the select and group by clause
|
||||
*
|
||||
* @param row input rowgroup that contains all the columns in all the expressions
|
||||
* @param expressions vector of F&Es that needs evaluation. The results are filled on each row.
|
||||
*/
|
||||
inline void evaluate(rowgroup::RowGroup& rowgroup, std::vector<execplan::SRCP>& expressions);
|
||||
|
||||
/** @brief get functor from functor map
|
||||
*
|
||||
* @param funcName function name
|
||||
* @return functor pointer. If non-support function, return NULL
|
||||
*/
|
||||
Func* getFunctor(std::string& funcName);
|
||||
class FuncExp
|
||||
{
|
||||
public:
|
||||
|
||||
/** Singleton pattern */
|
||||
static FuncExp* instance();
|
||||
|
||||
/********************************************************************
|
||||
* Row based evaluation APIs
|
||||
********************************************************************/
|
||||
|
||||
/** @brief evaluate a filter stack on row. used for F&E on the where clause
|
||||
*
|
||||
* @param row input row that contains all the columns in the filter stack
|
||||
* @param filters parsetree of filters to evaluate
|
||||
* @return boolean of whether or not the row passed evaluation
|
||||
*/
|
||||
inline bool evaluate(rowgroup::Row& row, execplan::ParseTree* filters);
|
||||
|
||||
/** @brief evaluate a filter stack on rowgroup
|
||||
*
|
||||
* @param row input rowgroup that contains all the columns in the filter stack
|
||||
* @param filters parse tree of filters to evaluate. The failed rows are removed from the rowgroup
|
||||
*/
|
||||
inline void evaluate(rowgroup::RowGroup& rowgroup, execplan::ParseTree* filters);
|
||||
|
||||
/** @brief evaluate a F&E column on row. used for F&E on the select and group by clause
|
||||
*
|
||||
* @param row input row that contains all the columns in all the expressions
|
||||
* @param expressions vector of F&Es that needs evaluation. The results are filled on the row.
|
||||
*/
|
||||
void evaluate(rowgroup::Row& row, std::vector<execplan::SRCP>& expressions);
|
||||
|
||||
/** @brief evaluate a F&E column on rowgroup. used for F&E on the select and group by clause
|
||||
*
|
||||
* @param row input rowgroup that contains all the columns in all the expressions
|
||||
* @param expressions vector of F&Es that needs evaluation. The results are filled on each row.
|
||||
*/
|
||||
inline void evaluate(rowgroup::RowGroup& rowgroup, std::vector<execplan::SRCP>& expressions);
|
||||
|
||||
/** @brief get functor from functor map
|
||||
*
|
||||
* @param funcName function name
|
||||
* @return functor pointer. If non-support function, return NULL
|
||||
*/
|
||||
Func* getFunctor(std::string& funcName);
|
||||
|
||||
private:
|
||||
static FuncExp* fInstance;
|
||||
static boost::mutex fInstanceMutex;
|
||||
FuncMap fFuncMap;
|
||||
FuncExp();
|
||||
static FuncExp* fInstance;
|
||||
static boost::mutex fInstanceMutex;
|
||||
FuncMap fFuncMap;
|
||||
FuncExp();
|
||||
};
|
||||
|
||||
inline bool FuncExp::evaluate( rowgroup::Row& row, execplan::ParseTree* filters )
|
||||
{
|
||||
bool isNull = false;
|
||||
return (filters->getBoolVal(row, isNull));
|
||||
{
|
||||
bool isNull = false;
|
||||
return (filters->getBoolVal(row, isNull));
|
||||
}
|
||||
|
||||
inline void FuncExp::evaluate( rowgroup::RowGroup& rowgroup, execplan::ParseTree* filters )
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user