diff --git a/src/sql/resolver/expr/ob_raw_expr.cpp b/src/sql/resolver/expr/ob_raw_expr.cpp index 5e76e2e04f..0afbdd443b 100644 --- a/src/sql/resolver/expr/ob_raw_expr.cpp +++ b/src/sql/resolver/expr/ob_raw_expr.cpp @@ -3667,7 +3667,9 @@ bool ObSysFunRawExpr::inner_same_as( T_FUN_SYS_RANDOM == get_expr_type() || T_FUN_SYS_GUID == get_expr_type() || T_OP_GET_USER_VAR == get_expr_type() || - T_OP_GET_SYS_VAR == get_expr_type()) { + T_OP_GET_SYS_VAR == get_expr_type() || + (has_flag(IS_STATE_FUNC) && (NULL == check_context || + (NULL != check_context && check_context->need_check_deterministic_)))) { } else if (get_expr_class() == expr.get_expr_class()) { //for EXPR_UDF and EXPR_SYS_FUNC const ObSysFunRawExpr *s_expr = static_cast(&expr);