Fix assign expr type deduce for enumset
This commit is contained in:
@ -8768,6 +8768,8 @@ CAST_FUNC_NAME(geometry, decimalint)
|
||||
} else {
|
||||
ObDecimalIntBuilder res_val;
|
||||
res_val.from((int32_t)0);
|
||||
ObPrecision out_prec = expr.datum_meta_.precision_;
|
||||
res_val.extend(wide::ObDecimalIntConstValue::get_int_bytes_by_precision(out_prec));
|
||||
res_datum.set_decimal_int(res_val.get_decimal_int(), res_val.get_int_bytes());
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user