fix trim expr deduce bug

This commit is contained in:
bf0
2022-03-23 14:01:34 +08:00
committed by LINxiansheng
parent fd436db3f8
commit 9fa49d5dca

View File

@ -411,9 +411,9 @@ inline int ObExprTrim::deduce_result_type(
// deduce charset // deduce charset
ObSEArray<ObExprResType, 2> tmp_types; ObSEArray<ObExprResType, 2> tmp_types;
OZ(tmp_types.push_back(*str_type)); OZ(tmp_types.push_back(*str_type));
if (NULL != pattern_type) { // if (NULL != pattern_type) {
OZ(tmp_types.push_back(*pattern_type)); // OZ(tmp_types.push_back(*pattern_type));
} //}
OZ(aggregate_charsets_for_string_result_with_comparison( OZ(aggregate_charsets_for_string_result_with_comparison(
type, &tmp_types.at(0), tmp_types.count(), type_ctx.get_coll_type())); type, &tmp_types.at(0), tmp_types.count(), type_ctx.get_coll_type()));
str_type->set_calc_collation_type(type.get_collation_type()); str_type->set_calc_collation_type(type.get_collation_type());