You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-5625: Fixes json_query implementation
Also extends func_json_value.test.
This commit is contained in:
committed by
Leonid Fedorov
parent
29447430eb
commit
1f958c9ed2
@ -11,6 +11,16 @@ using namespace joblist;
|
||||
|
||||
namespace funcexp
|
||||
{
|
||||
|
||||
class QueryJSONPathWrapper : public JSONPathWrapper
|
||||
{
|
||||
bool checkAndGetValue(JSONEgWrapper* je, string& res, int* error) override
|
||||
{
|
||||
return je->checkAndGetComplexVal(res, error);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
bool JSONEgWrapper::checkAndGetComplexVal(string& ret, int* error)
|
||||
{
|
||||
if (json_value_scalar(this))
|
||||
@ -42,7 +52,8 @@ string Func_json_query::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& is
|
||||
execplan::CalpontSystemCatalog::ColType& type)
|
||||
{
|
||||
string ret;
|
||||
isNull = JSONPathWrapper::extract(ret, row, fp[0], fp[1]);
|
||||
QueryJSONPathWrapper qpw;
|
||||
isNull = qpw.extract(ret, row, fp[0], fp[1]);
|
||||
return isNull ? "" : ret;
|
||||
}
|
||||
} // namespace funcexp
|
||||
|
Reference in New Issue
Block a user