[FEAT MERGE] JSON/XML phase2 and JSON Partial Update

Co-authored-by: Carrot-77 <1012982871@qq.com>
Co-authored-by: wu-xingying <729224612@qq.com>
This commit is contained in:
shadowao
2024-04-12 10:46:02 +00:00
committed by ob-robot
parent fbfcd0feaa
commit 4afa70a218
254 changed files with 55981 additions and 10150 deletions

View File

@ -14,6 +14,7 @@
#define USING_LOG_PREFIX SQL_ENG
#include "ob_expr_json_keys.h"
#include "ob_expr_json_func_helper.h"
#include "share/ob_json_access_utils.h"
using namespace oceanbase::common;
using namespace oceanbase::sql;
@ -87,7 +88,8 @@ int ObExprJsonKeys::get_keys_from_wrapper(ObIJsonBase *json_doc,
iter.next();
}
if (OB_FAIL(res_array.get_raw_binary(str, allocator))) {
if (OB_FAIL(ret)) {
} else if (OB_FAIL(ObJsonWrapper::get_raw_binary(&res_array, str, allocator))) {
LOG_WARN("json_keys get result binary failed", K(ret));
}
return ret;
@ -120,7 +122,7 @@ int ObExprJsonKeys::eval_json_keys(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &
} else if (OB_FAIL(expr.args_[1]->eval(ctx, path_data))) {
LOG_WARN("eval json path datum failed", K(ret));
} else {
ObJsonBaseVector sub_json_targets;
ObJsonSeekResult sub_json_targets;
ObJsonPath *json_path;
ObString path_val = path_data->get_string();
if (OB_FAIL(ObJsonExprHelper::get_json_or_str_data(expr.args_[1], ctx, temp_allocator, path_val, is_null_result))) {