bugfix: support for using current_user function without ending parentheses

This commit is contained in:
obdev
2023-09-09 11:32:59 +00:00
committed by ob-robot
parent 4f3a9fdea4
commit 7198e18f7a
2 changed files with 26 additions and 5 deletions

View File

@ -882,6 +882,16 @@ int ObRawExprResolverImpl::do_recursive_resolve(const ParseNode *node, ObRawExpr
}
break;
}
case T_FUN_SYS_CURRENT_USER: {
ObSysFunRawExpr *f_expr = NULL;
if (OB_FAIL(ctx_.expr_factory_.create_raw_expr(T_FUN_SYS_CURRENT_USER, f_expr))) {
LOG_WARN("fail to create raw expr", K(ret));
} else {
f_expr->set_func_name(ObString::make_string(N_CURRENT_USER));
expr = f_expr;
}
break;
}
case T_COLLATION: {
// used in internal function `set_collation' to implement COLLATE clause
if (OB_FAIL(process_collation_node(node, expr))) {