[CP] fix json output type

This commit is contained in:
obdev 2022-07-22 18:21:27 +08:00 committed by wangyunlai.wyl
parent 39fd66a55a
commit 7e8bf7f641
2 changed files with 3 additions and 4 deletions

View File

@ -135,11 +135,12 @@ public:
set_collation_type(CS_TYPE_INVALID);
} else if (ObHexStringType == type_) {
set_collation_type(CS_TYPE_BINARY);
} else if (ob_is_json(static_cast<ObObjType>(type_))) {
set_collation_type(CS_TYPE_UTF8MB4_BIN);
} else if (!ob_is_string_type(static_cast<ObObjType>(type_)) &&
!ob_is_lob_locator(static_cast<ObObjType>(type_)) &&
!ob_is_raw(static_cast<ObObjType>(type_)) &&
!ob_is_enum_or_set_type(static_cast<ObObjType>(type_)) &&
!ob_is_json(static_cast<ObObjType>(type_))) {
!ob_is_enum_or_set_type(static_cast<ObObjType>(type_))) {
set_collation_level(CS_LEVEL_NUMERIC);
set_collation_type(CS_TYPE_BINARY);
}

View File

@ -3285,7 +3285,6 @@ int ObAggregateFunction::get_json_arrayagg_result(const ObAggregateExpression *&
LOG_WARN("convert string collation failed", K(ret), K(cs_type), K(origin_str.length()));
} else {
converted_obj.set_string(val_type, converted_str);
converted_obj.set_collation_type(CS_TYPE_UTF8MB4_BIN);
cs_type = CS_TYPE_UTF8MB4_BIN;
}
}
@ -3430,7 +3429,6 @@ int ObAggregateFunction::get_json_objectagg_result(const ObAggregateExpression *
LOG_WARN("convert string collation failed", K(ret), K(cs_type1), K(origin_str.length()));
} else {
converted_obj.set_string(val_type1, converted_str);
converted_obj.set_collation_type(CS_TYPE_UTF8MB4_BIN);
cs_type1 = CS_TYPE_UTF8MB4_BIN;
}
}