Patch bug fixes to opensource branch.

This commit is contained in:
jz0
2021-08-19 17:53:21 +08:00
committed by wangzelin.wzl
parent 10799a599b
commit a0ff8aaa32
14 changed files with 524 additions and 765 deletions

View File

@ -685,9 +685,12 @@ int ObLogTableScan::extract_access_exprs(
} else if (OB_ISNULL(expr)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("expr is null", K(col_idx), K(ret));
} else if (OB_FAIL(expr->formalize(opt_ctx->get_session_info()))) {
LOG_WARN("failed to formalize the new expr", K(ret));
} else { /*do nothing*/
} else {
expr->set_ref_id(get_table_id(), column_schema->get_column_id());
if (OB_FAIL(expr->formalize(opt_ctx->get_session_info()))) {
LOG_WARN("failed to formalize the new expr", K(ret));
} else { /*do nothing*/
}
}
if (OB_SUCC(ret)) {
if (OB_FAIL(rowkey_exprs.push_back(expr))) {

View File

@ -43,8 +43,10 @@ int ObLogTempTableInsert::allocate_exchange_post(AllocExchContext* ctx)
LOG_WARN("get unexpected null", K(child), K(ret));
} else if (child->get_sharding_info().is_distributed()) {
sharding_info_.set_location_type(child->get_sharding_info().get_location_type());
} else {
ret = sharding_info_.copy_with_part_keys(child->get_sharding_info());
} else if (OB_FAIL(sharding_info_.copy_with_part_keys(child->get_sharding_info()))) {
LOG_WARN("failed to copy sharding info", K(ret));
} else if (sharding_info_.is_match_all()) {
sharding_info_.set_location_type(OB_TBL_LOCATION_LOCAL);
}
return ret;
}

View File

@ -666,6 +666,8 @@ int ObOptimizerUtil::compute_const_exprs(
LOG_WARN("failed to push back expr", K(ret));
} else { /*do nothing*/
}
} else if (T_BOOL == const_expr->get_expr_type()) {
// is true/false will not be regarded as const
} else if (OB_FAIL(add_var_to_array_no_dup(const_exprs, common_expr))) {
LOG_WARN("failed to push back expr", K(ret));
} else { /*do nothing*/