[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:
@ -13,6 +13,7 @@
|
||||
|
||||
#define USING_LOG_PREFIX SQL_ENG
|
||||
#include "ob_expr_json_array_insert.h"
|
||||
#include "share/ob_json_access_utils.h"
|
||||
#include "sql/engine/expr/ob_expr_json_func_helper.h"
|
||||
|
||||
using namespace oceanbase::common;
|
||||
@ -83,7 +84,7 @@ int ObExprJsonArrayInsert::eval_json_array_insert(const ObExpr &expr, ObEvalCtx
|
||||
common::ObArenaAllocator &temp_allocator = tmp_alloc_g.get_allocator();
|
||||
ObIJsonBase *j_base = NULL;
|
||||
bool is_null = false;
|
||||
ObJsonBaseVector hit;
|
||||
ObJsonSeekResult hit;
|
||||
|
||||
if (expr.datum_meta_.cs_type_ != CS_TYPE_UTF8MB4_BIN) {
|
||||
ret = OB_ERR_INVALID_JSON_CHARSET;
|
||||
@ -148,7 +149,7 @@ int ObExprJsonArrayInsert::eval_json_array_insert(const ObExpr &expr, ObEvalCtx
|
||||
ObString raw_bin;
|
||||
if (is_null) {
|
||||
res.set_null();
|
||||
} else if (OB_FAIL(j_base->get_raw_binary(raw_bin, &temp_allocator))) {
|
||||
} else if (OB_FAIL(ObJsonWrapper::get_raw_binary(j_base, raw_bin, &temp_allocator))) {
|
||||
LOG_WARN("failed: get json raw binary", K(ret));
|
||||
} else if (OB_FAIL(ObJsonExprHelper::pack_json_str_res(expr, ctx, res, raw_bin))) {
|
||||
LOG_WARN("fail to pack json result", K(ret));
|
||||
|
||||
Reference in New Issue
Block a user