[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

@ -117,11 +117,13 @@ int ObExprField::calc_result_typeN(ObExprResType &type,
type.set_precision(3);
//calc comparison collation,etc
type.set_scale(DEFAULT_SCALE_FOR_INTEGER);
if (ob_is_string_type(type.get_calc_type())) {
ret = aggregate_charsets_for_comparison(type, types_stack, param_num, type_ctx.get_coll_type());
}
OZ (aggregate_charsets_for_comparison(type,
types_stack,
param_num,
type_ctx));
if (OB_SUCC(ret) && !types_stack[0].is_null()) {
for (int64_t i = 0; OB_SUCC(ret) && i < param_num; ++i) {
types_stack[i].set_calc_type(type.get_type());
types_stack[i].set_calc_meta(type.get_calc_meta());
types_stack[i].set_calc_accuracy(types_stack[0].get_accuracy());
if (type.get_calc_meta().is_decimal_int()) {