1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

chore(codestyle): mark virtual methods as override

This commit is contained in:
Aleksei Antipovskii
2024-09-12 12:27:02 +02:00
committed by Leonid Fedorov
parent 6001db44ab
commit 5556d818f8
303 changed files with 4091 additions and 4894 deletions

View File

@ -28,7 +28,7 @@ struct JSONPath
JSONPath() : constant(false), parsed(false), currStep(nullptr)
{
}
json_path_t p;
json_path_t p{};
bool constant; // check if the argument is constant
bool parsed; // check if the argument is parsed
json_path_step_t* currStep;
@ -52,10 +52,9 @@ class JSONEgWrapper : public json_engine_t
class JSONPathWrapper : public JSONPath
{
protected:
virtual ~JSONPathWrapper()
{
}
virtual ~JSONPathWrapper() = default;
virtual bool checkAndGetValue(JSONEgWrapper* je, std::string& ret, int* error) = 0;
public:
bool extract(std::string& ret, rowgroup::Row& row, execplan::SPTP& funcParmJS,
execplan::SPTP& funcParmPath);
@ -68,15 +67,13 @@ class Func_json_valid : public Func_Bool
Func_json_valid() : Func_Bool("json_valid")
{
}
~Func_json_valid()
{
}
~Func_json_valid() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
bool getBoolVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_depth class
@ -87,15 +84,13 @@ class Func_json_depth : public Func_Int
Func_json_depth() : Func_Int("json_depth")
{
}
virtual ~Func_json_depth()
{
}
~Func_json_depth() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
int64_t getIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_length class
@ -109,15 +104,13 @@ class Func_json_length : public Func_Int
Func_json_length() : Func_Int("json_length")
{
}
virtual ~Func_json_length()
{
}
~Func_json_length() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
int64_t getIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_equals class
@ -128,15 +121,13 @@ class Func_json_equals : public Func_Bool
Func_json_equals() : Func_Bool("json_equals")
{
}
~Func_json_equals()
{
}
~Func_json_equals() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
bool getBoolVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_normalize class
@ -147,15 +138,13 @@ class Func_json_normalize : public Func_Str
Func_json_normalize() : Func_Str("json_normalize")
{
}
virtual ~Func_json_normalize()
{
}
~Func_json_normalize() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_type class
@ -166,15 +155,13 @@ class Func_json_type : public Func_Str
Func_json_type() : Func_Str("json_type")
{
}
virtual ~Func_json_type()
{
}
~Func_json_type() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_object class
@ -185,15 +172,13 @@ class Func_json_object : public Func_Str
Func_json_object() : Func_Str("json_object")
{
}
virtual ~Func_json_object()
{
}
~Func_json_object() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_array class
@ -204,15 +189,13 @@ class Func_json_array : public Func_Str
Func_json_array() : Func_Str("json_array")
{
}
virtual ~Func_json_array()
{
}
~Func_json_array() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_keys class
*/
@ -225,15 +208,13 @@ class Func_json_keys : public Func_Str
Func_json_keys() : Func_Str("json_keys")
{
}
virtual ~Func_json_keys()
{
}
~Func_json_keys() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_exists class
*/
@ -246,15 +227,13 @@ class Func_json_exists : public Func_Bool
Func_json_exists() : Func_Bool("json_exists")
{
}
~Func_json_exists()
{
}
~Func_json_exists() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
bool getBoolVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_quote class
@ -268,15 +247,13 @@ class Func_json_quote : public Func_Str
Func_json_quote() : Func_Str("json_quote")
{
}
virtual ~Func_json_quote()
{
}
~Func_json_quote() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_unquote class
@ -290,15 +267,13 @@ class Func_json_unquote : public Func_Str
Func_json_unquote() : Func_Str("json_unquote")
{
}
virtual ~Func_json_unquote()
{
}
~Func_json_unquote() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_format class
@ -321,7 +296,7 @@ class Func_json_format : public Func_Str
Func_json_format() : Func_Str("json_detailed"), fmt(DETAILED)
{
}
Func_json_format(FORMATS format) : fmt(format)
explicit Func_json_format(FORMATS format) : fmt(format)
{
assert(format != NONE);
switch (format)
@ -332,15 +307,13 @@ class Func_json_format : public Func_Str
default: break;
}
}
virtual ~Func_json_format()
{
}
~Func_json_format() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_merge_preserve class
*/
@ -350,15 +323,13 @@ class Func_json_merge : public Func_Str
Func_json_merge() : Func_Str("json_merge_preserve")
{
}
virtual ~Func_json_merge()
{
}
~Func_json_merge() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_merge_patch class
@ -369,15 +340,13 @@ class Func_json_merge_patch : public Func_Str
Func_json_merge_patch() : Func_Str("json_merge_patch")
{
}
virtual ~Func_json_merge_patch()
{
}
~Func_json_merge_patch() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_value class
@ -388,9 +357,7 @@ class Func_json_value : public Func_Str
Func_json_value() : Func_Str("json_value")
{
}
virtual ~Func_json_value()
{
}
~Func_json_value() override = default;
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
@ -407,9 +374,7 @@ class Func_json_query : public Func_Str
Func_json_query() : Func_Str("json_query")
{
}
virtual ~Func_json_query()
{
}
~Func_json_query() override = default;
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
@ -431,15 +396,13 @@ class Func_json_contains : public Func_Bool
Func_json_contains() : Func_Bool("json_contains"), arg2Const(false), arg2Parsed(false), arg2Val("")
{
}
virtual ~Func_json_contains()
{
}
~Func_json_contains() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
bool getBoolVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_array_append class
*/
@ -452,15 +415,13 @@ class Func_json_array_append : public Func_Str
Func_json_array_append() : Func_Str("json_array_append")
{
}
virtual ~Func_json_array_append()
{
}
~Func_json_array_append() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
private:
static const int padding = 8;
@ -476,15 +437,13 @@ class Func_json_array_insert : public Func_Str
Func_json_array_insert() : Func_Str("json_array_insert")
{
}
virtual ~Func_json_array_insert()
{
}
~Func_json_array_insert() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_insert class
@ -508,7 +467,7 @@ class Func_json_insert : public Func_Str
Func_json_insert() : Func_Str("json_insert"), mode(INSERT)
{
}
Func_json_insert(MODE m) : mode(m)
explicit Func_json_insert(MODE m) : mode(m)
{
assert(m != NONE);
switch (m)
@ -519,20 +478,18 @@ class Func_json_insert : public Func_Str
default: break;
}
}
virtual ~Func_json_insert()
{
}
~Func_json_insert() override = default;
MODE getMode() const
{
return mode;
}
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_remove class
*/
@ -545,15 +502,13 @@ class Func_json_remove : public Func_Str
Func_json_remove() : Func_Str("json_remove")
{
}
virtual ~Func_json_remove()
{
}
~Func_json_remove() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_contains_path class
@ -572,15 +527,13 @@ class Func_json_contains_path : public Func_Bool
: Func_Bool("json_contains_path"), isModeOne(false), isModeConst(false), isModeParsed(false)
{
}
virtual ~Func_json_contains_path()
{
}
~Func_json_contains_path() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
bool getBoolVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_overlaps class
@ -594,15 +547,13 @@ class Func_json_overlaps : public Func_Bool
Func_json_overlaps() : Func_Bool("json_overlaps")
{
}
virtual ~Func_json_overlaps()
{
}
~Func_json_overlaps() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
bool getBoolVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
};
/** @brief Func_json_search class
*/
@ -620,15 +571,13 @@ class Func_json_search : public Func_Str
: Func_Str("json_search"), isModeParsed(false), isModeConst(false), isModeOne(false), escape('\\')
{
}
virtual ~Func_json_search()
{
}
~Func_json_search() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
private:
int cmpJSValWild(json_engine_t* jsEg, const utils::NullString& cmpStr, const CHARSET_INFO* cs);
@ -644,24 +593,22 @@ class Func_json_extract : public Func_Str
Func_json_extract() : Func_Str("json_extract")
{
}
virtual ~Func_json_extract()
{
}
~Func_json_extract() override = default;
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp,
execplan::CalpontSystemCatalog::ColType& resultType);
execplan::CalpontSystemCatalog::ColType operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
std::string getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
int64_t getIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
double getDoubleVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
execplan::IDB_Decimal getDecimalVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type);
execplan::CalpontSystemCatalog::ColType& type) override;
private:
int doExtract(rowgroup::Row& row, FunctionParm& fp, json_value_types* type, std::string& retJS,