fix bugs of INET expr

This commit is contained in:
xf0
2021-10-13 20:33:10 +08:00
committed by wangzelin.wzl
parent 72122fbe1c
commit 490ce0a9df
5 changed files with 10 additions and 11 deletions

View File

@ -39,16 +39,15 @@ private:
inline int ObExprInt2ip::calc_result_type1(
ObExprResType& type, ObExprResType& text, common::ObExprTypeCtx& type_ctx) const
{
UNUSED(type_ctx);
UNUSED(text);
type_ctx.set_cast_mode(type_ctx.get_cast_mode() | CM_STRING_INTEGER_TRUNC);
text.set_calc_type(common::ObIntType);
type.set_varchar();
type.set_length(common::MAX_IP_ADDR_LENGTH);
type.set_collation_level(common::CS_LEVEL_COERCIBLE);
type.set_default_collation_type();
// set calc type
text.set_calc_type(common::ObIntType);
return common::OB_SUCCESS;
}
} // namespace sql
} // namespace oceanbase
}
}
#endif /* OCEANBASE_SQL_ENGINE_EXPR_OB_EXPR_INT2IP_ */