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
fix(funcexp): MCOL-5607: JSON function use crashes query execution (#3028)
JSON functions were implemented violating an assumption of their pureness, as they should not have any state. This concrete patch fixes implementation of JSON_VALUE function.
This commit is contained in:
@ -56,6 +56,7 @@ class JSONPathWrapper : public JSONPath
|
||||
{
|
||||
}
|
||||
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);
|
||||
};
|
||||
@ -381,7 +382,7 @@ class Func_json_merge_patch : public Func_Str
|
||||
|
||||
/** @brief Func_json_value class
|
||||
*/
|
||||
class Func_json_value : public Func_Str, public JSONPathWrapper
|
||||
class Func_json_value : public Func_Str
|
||||
{
|
||||
public:
|
||||
Func_json_value() : Func_Str("json_value")
|
||||
@ -391,11 +392,6 @@ class Func_json_value : public Func_Str, public JSONPathWrapper
|
||||
{
|
||||
}
|
||||
|
||||
bool checkAndGetValue(JSONEgWrapper* je, string& res, int* error) override
|
||||
{
|
||||
return je->checkAndGetScalar(res, error);
|
||||
}
|
||||
|
||||
execplan::CalpontSystemCatalog::ColType operationType(
|
||||
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType) override;
|
||||
|
||||
|
Reference in New Issue
Block a user