[FEAT MERGE] 424 SQL compatibility patch 433

Co-authored-by: wjhh2008 <wjh2006-1@163.com>
Co-authored-by: GongYusen <986957406@qq.com>
Co-authored-by: hy-guo <fqboyg@gmail.com>
This commit is contained in:
jingtaoye35
2024-08-23 03:32:01 +00:00
committed by ob-robot
parent cb61323917
commit e537a0c479
296 changed files with 21588 additions and 4122 deletions

View File

@ -505,16 +505,13 @@ int ObValuesTableCompression::resolve_params_for_values_clause(ObPlanCacheCtx &p
if (OB_SUCC(ret) && !is_same) {
new_res_type.reset();
ObExprVersion dummy_op(pc_ctx.allocator_);
const ObLengthSemantics length_semantics = session->get_actual_nls_length_semantics();
ObCollationType coll_type = CS_TYPE_INVALID;
if (OB_FAIL(session->get_collation_connection(coll_type))) {
LOG_WARN("fail to get_collation_connection", K(ret));
} else if (OB_FAIL(dummy_op.aggregate_result_type_for_merge(new_res_type,
ObExprTypeCtx type_ctx;
ObSQLUtils::init_type_ctx(session, type_ctx);
if (OB_FAIL(dummy_op.aggregate_result_type_for_merge(new_res_type,
&res_types.at(0),
res_types.count(),
coll_type,
false,
length_semantics))) {
type_ctx))) {
LOG_WARN("failed to aggregate result type for merge", K(ret));
}
}
@ -657,16 +654,13 @@ int ObValuesTableCompression::resolve_params_for_values_clause(ObPlanCacheCtx &p
if (OB_SUCC(ret) && !is_same) {
new_res_type.reset();
ObExprVersion dummy_op(pc_ctx.allocator_);
const ObLengthSemantics length_semantics = session->get_actual_nls_length_semantics();
ObCollationType coll_type = CS_TYPE_INVALID;
if (OB_FAIL(session->get_collation_connection(coll_type))) {
LOG_WARN("fail to get_collation_connection", K(ret));
} else if (OB_FAIL(dummy_op.aggregate_result_type_for_merge(new_res_type,
ObExprTypeCtx type_ctx;
ObSQLUtils::init_type_ctx(session, type_ctx);
if (OB_FAIL(dummy_op.aggregate_result_type_for_merge(new_res_type,
&res_types.at(0),
res_types.count(),
coll_type,
false,
length_semantics))) {
type_ctx))) {
LOG_WARN("failed to aggregate result type for merge", K(ret));
} else {
LOG_TRACE("get result type", K(new_res_type), K(res_types));