Fix assign expr type deduce for enumset

This commit is contained in:
hezuojiao
2024-03-07 03:18:55 +00:00
committed by ob-robot
parent 4c5811f762
commit 5700951d28
2 changed files with 6 additions and 0 deletions

View File

@ -53,6 +53,10 @@ int ObExprAssign::calc_result_type2(ObExprResType &type,
type.set_varchar();
type.set_collation_level(common::CS_LEVEL_IMPLICIT);
type.set_collation_type(common::CS_TYPE_BINARY);
} else if (ob_is_enum_or_set_type(value.get_type())) {
type.set_varchar();
type.set_collation_level(value.get_collation_level());
type.set_collation_type(value.get_collation_type());
} else {
type.set_type(val_type);
type.set_collation_level(common::CS_LEVEL_IMPLICIT);