[Json] json patch from 3.2.2 branch since 2021.12

This commit is contained in:
xj0
2022-02-16 17:34:14 +08:00
committed by LINxiansheng
parent 63edf11b9a
commit bb573a7cd4
47 changed files with 947 additions and 682 deletions

View File

@ -245,6 +245,11 @@ int ObRawExprDeduceType::assign_var_exprs_result_type(ObNonTerminalRawExpr& expr
return ret;
}
bool need_calc_json_as_int(ObItemType item_type)
{
return item_type == T_OP_BOOL;
}
bool need_calc_json_as_text(ObItemType item_type)
{
bool bool_ret = true;

View File

@ -602,6 +602,19 @@ int ObRawExprInfoExtractor::visit(ObSysFunRawExpr& expr)
expr.clear_flag(IS_CALCULABLE_EXPR);
}
if (OB_SUCC(ret) && T_FUN_SYS_JSON_VALUE == expr.get_expr_type()) {
if (expr.get_param_count() == 7) {
ObRawExpr * sub_expr = expr.get_param_expr(6);
if (OB_NOT_NULL(sub_expr)) {
sub_expr->clear_flag(IS_CALCULABLE_EXPR);
}
sub_expr = expr.get_param_expr(4);
if (OB_NOT_NULL(sub_expr)) {
sub_expr->clear_flag(IS_CALCULABLE_EXPR);
}
}
}
if (OB_SUCC(ret) && T_FUN_UDF == expr.get_expr_type() && expr.has_flag(IS_CALCULABLE_EXPR)) {}
}
return ret;