Add new type default string length

This commit is contained in:
br0
2021-11-02 14:31:00 +08:00
committed by LINxiansheng
parent 22d5eee21f
commit 0121cc45a8
2 changed files with 43 additions and 4 deletions

View File

@ -137,11 +137,24 @@ int ObExprCast::get_cast_string_len(ObExprResType& type1, ObExprResType& type2,
case ObHexStringType:
case ObRawType:
case ObNVarchar2Type:
case ObNCharType: {
case ObNCharType:
case ObEnumType:
case ObSetType:
case ObEnumInnerType:
case ObSetInnerType:
case ObURowIDType:
case ObLobType: {
res_len = type1.get_length();
length_semantics = type1.get_length_semantics();
break;
}
case ObBitType: {
if (scale > 0) {
res_len = scale;
}
res_len = (res_len + 7) / 8;
break;
}
default: {
break;
}