Do not report ERROR when sample rate equals 100

This commit is contained in:
ZenoWang
2024-02-06 14:49:31 +00:00
committed by ob-robot
parent 1f1d5c08ae
commit c8ef409bf3
3710 changed files with 486984 additions and 3083329 deletions

View File

@ -68,9 +68,13 @@ int ObExprLeft::calc_result_type2(ObExprResType &type,
{
int ret = OB_SUCCESS;
ObSQLSessionInfo *session = const_cast<ObSQLSessionInfo *>(type_ctx.get_session());
ObExecContext *exec_ctx = nullptr;
if (OB_ISNULL(session)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("session is NULL", K(ret));
} else if (OB_ISNULL(exec_ctx = session->get_cur_exec_ctx())) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("exec context is NULL", K(ret));
} else if (session->is_varparams_sql_prepare()) {
// the ps prepare stage does not do type deduction, and directly gives a default type.
type.set_char();
@ -173,12 +177,5 @@ int ObExprLeft::cg_expr(ObExprCGCtx &expr_cg_ctx, const ObRawExpr &raw_expr,
return ret;
}
DEF_SET_LOCAL_SESSION_VARS(ObExprLeft, raw_expr) {
int ret = OB_SUCCESS;
SET_LOCAL_SYSVAR_CAPACITY(1);
EXPR_ADD_LOCAL_SYSVAR(share::SYS_VAR_COLLATION_CONNECTION);
return ret;
}
} /* namespace sql */
} /* namespace oceanbase */