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

@ -37,52 +37,66 @@ namespace funcexp
class Func_Bool : public Func
{
public:
Func_Bool() {}
Func_Bool(const std::string& funcName) : Func(funcName) {}
virtual ~Func_Bool() {}
Func_Bool() {}
Func_Bool(const std::string& funcName) : Func(funcName) {}
virtual ~Func_Bool() {}
/*
virtual bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct) = 0;
*/
/*
virtual bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct) = 0;
*/
int64_t getIntVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{ return (getBoolVal(row, fp, isNull, op_ct) ? 1 : 0); }
int64_t getIntVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{
return (getBoolVal(row, fp, isNull, op_ct) ? 1 : 0);
}
double getDoubleVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{ return (getBoolVal(row, fp, isNull, op_ct) ? 1.0 : 0.0); }
double getDoubleVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{
return (getBoolVal(row, fp, isNull, op_ct) ? 1.0 : 0.0);
}
std::string getStrVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{ return (getBoolVal(row, fp, isNull, op_ct) ? "1" : "0"); }
std::string getStrVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{
return (getBoolVal(row, fp, isNull, op_ct) ? "1" : "0");
}
execplan::IDB_Decimal getDecimalVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{ return execplan::IDB_Decimal(getIntVal(row, fp, isNull, op_ct),0,0); }
execplan::IDB_Decimal getDecimalVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{
return execplan::IDB_Decimal(getIntVal(row, fp, isNull, op_ct), 0, 0);
}
int32_t getDateIntVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{ isNull = true; return 0; }
int32_t getDateIntVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{
isNull = true;
return 0;
}
int64_t getDatetimeIntVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{ isNull = true; return 0; }
int64_t getDatetimeIntVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{
isNull = true;
return 0;
}
};
@ -91,15 +105,15 @@ public:
class Func_between : public Func_Bool
{
public:
Func_between() : Func_Bool("between") {}
virtual ~Func_between() {}
Func_between() : Func_Bool("between") {}
virtual ~Func_between() {}
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
};
@ -108,15 +122,15 @@ public:
class Func_notbetween : public Func_Bool
{
public:
Func_notbetween() : Func_Bool("notbetween") {}
virtual ~Func_notbetween() {}
Func_notbetween() : Func_Bool("notbetween") {}
virtual ~Func_notbetween() {}
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
};
@ -125,15 +139,15 @@ public:
class Func_in : public Func_Bool
{
public:
Func_in() : Func_Bool("in") {}
virtual ~Func_in() {}
Func_in() : Func_Bool("in") {}
virtual ~Func_in() {}
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
};
@ -142,15 +156,15 @@ public:
class Func_notin : public Func_Bool
{
public:
Func_notin() : Func_Bool("notin") {}
virtual ~Func_notin() {}
Func_notin() : Func_Bool("notin") {}
virtual ~Func_notin() {}
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
};
@ -159,15 +173,15 @@ public:
class Func_regexp : public Func_Bool
{
public:
Func_regexp() : Func_Bool("regexp") {}
virtual ~Func_regexp() {}
Func_regexp() : Func_Bool("regexp") {}
virtual ~Func_regexp() {}
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
};
@ -176,28 +190,28 @@ public:
class Func_isnull : public Func_Bool
{
public:
/*
* Constructor. Pass the function name to the base constructor.
*/
Func_isnull():fIsNotNull(false) {}
Func_isnull(bool isnotnull) : fIsNotNull(isnotnull) {}
/*
* Destructor. isnull does not need to do anything here to clean up.
*/
virtual ~Func_isnull() {}
/*
* Constructor. Pass the function name to the base constructor.
*/
Func_isnull(): fIsNotNull(false) {}
Func_isnull(bool isnotnull) : fIsNotNull(isnotnull) {}
/*
* Destructor. isnull does not need to do anything here to clean up.
*/
virtual ~Func_isnull() {}
/**
* Decide on the function's operation type
*/
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
/**
* Decide on the function's operation type
*/
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
private:
bool fIsNotNull;
bool fIsNotNull;
};