bugfix : null in json expr clause has core dump in fast parser

This commit is contained in:
obdev
2023-04-07 10:56:32 +00:00
committed by ob-robot
parent 7a1cb10674
commit 134f4eedae
4 changed files with 21 additions and 2 deletions

View File

@ -931,6 +931,15 @@ int ObRawExprResolverImpl::do_recursive_resolve(const ParseNode *node, ObRawExpr
}
break;
}
case T_NULLX_CLAUSE: {
modification_type_to_int(const_cast<ParseNode&>(*node));
// deal node
if (OB_FAIL(SMART_CALL(recursive_resolve(node, expr)))) {
LOG_WARN("fail to process node with children only", K(ret),
K(node->type_), K(node));
}
break;
}
case T_FUN_SYS_REGEXP_LIKE:
case T_FUN_SYS: {
if (OB_FAIL(process_fun_sys_node(node, expr))) {
@ -5350,6 +5359,12 @@ int ObRawExprResolverImpl::pre_check_json_path_valid(const ParseNode *node)
return ret;
}
// json expr change T_NULLX_CLAUSE to T_INT
void ObRawExprResolverImpl::modification_type_to_int(ParseNode &node)
{
node.type_ = T_INT;
}
int ObRawExprResolverImpl::process_json_value_node(const ParseNode *node, ObRawExpr *&expr)
{
INIT_SUCC(ret);

View File

@ -122,6 +122,7 @@ private:
int process_json_exists_node(const ParseNode *node, ObRawExpr *&expr);
int process_json_array_node(const ParseNode *node, ObRawExpr *&expr);
int process_json_mergepatch_node(const ParseNode *node, ObRawExpr *&expr);
static void modification_type_to_int(ParseNode &node);
int process_fun_sys_node(const ParseNode *node, ObRawExpr *&expr);
int process_dll_udf_node(const ParseNode *node, ObRawExpr *&expr);
int process_agg_udf_node(const ParseNode *node,