fix expr in sanity core cause of using hash calc when right params contain dynamic const

This commit is contained in:
obdev
2022-11-15 09:08:02 +00:00
committed by wangzelin.wzl
parent ed86624fbe
commit dfba79d833
2 changed files with 7 additions and 7 deletions

View File

@ -790,7 +790,7 @@ inline int ObExprGeneratorImpl::visit_in_expr(ObOpRawExpr &expr, ObExprInOrNotIn
bool param_all_same_cs_level = true;
for (int64_t j = 0; OB_SUCC(ret) && j < in_op->get_row_dimension(); ++j) {
param_all_const &= param1->get_param_expr(0)->get_param_expr(j)
->is_const_expr();
->is_static_const_expr();
ObObjType first_obj_type = param1->get_param_expr(0)->get_param_expr(j)
->get_data_type();
ObObjType cur_obj_type = ObMaxType;
@ -811,7 +811,7 @@ inline int ObExprGeneratorImpl::visit_in_expr(ObOpRawExpr &expr, ObExprInOrNotIn
}
if (ObNullType != first_obj_type && ObNullType != cur_obj_type) {
param_all_const &= param1->get_param_expr(i)->get_param_expr(j)
->is_const_expr();
->is_static_const_expr();
param_all_same_type &= (first_obj_type == cur_obj_type);
param_all_same_cs_type &= (first_obj_cs_type == cur_obj_cs_type);
param_all_same_cs_level &= (first_obj_cs_level == cur_obj_cs_level);
@ -844,7 +844,7 @@ inline int ObExprGeneratorImpl::visit_in_expr(ObOpRawExpr &expr, ObExprInOrNotIn
}
}
if (OB_SUCC(ret)) {
bool param_all_const = param1->get_param_expr(0)->is_const_expr();
bool param_all_const = param1->get_param_expr(0)->is_static_const_expr();
bool param_all_same_type = true;
bool param_all_same_cs_type = true;
bool param_all_is_ext = true;
@ -865,7 +865,7 @@ inline int ObExprGeneratorImpl::visit_in_expr(ObOpRawExpr &expr, ObExprInOrNotIn
first_obj_cs_type = cur_obj_cs_type;
}
if (ObNullType != first_obj_type && ObNullType != cur_obj_type) {
param_all_const &= param1->get_param_expr(i)->is_const_expr();
param_all_const &= param1->get_param_expr(i)->is_static_const_expr();
param_all_same_type &= (first_obj_type == cur_obj_type);
param_all_same_cs_type &= (first_obj_cs_type == cur_obj_cs_type);
param_all_same_cs_level &= (first_obj_cs_level == cur_obj_cs_level);

View File

@ -277,9 +277,9 @@ int ObExprToOutfileRow::print_field(char *buf, const int64_t buf_len, int64_t &p
int ObExprToOutfileRow::print_wchar_to_buf(char *buf, const int64_t buf_len, int64_t &pos,
int32_t wchar, ObCollationType coll_type)
{
int ret = OB_SUCCESS;
int result_len = 0;
if (OB_FAIL(ObCharset::wc_mb(coll_type, wchar, buf + pos, buf_len - pos, result_len))) {
int ret = OB_SUCCESS;
int result_len = 0;
if (OB_FAIL(ObCharset::wc_mb(coll_type, wchar, buf + pos, buf_len - pos, result_len))) {
LOG_WARN("failed to convert wc to mb");
} else {
pos += result_len;