patch 4.0

This commit is contained in:
wangzelin.wzl
2022-10-24 10:34:53 +08:00
parent 4ad6e00ec3
commit 93a1074b0c
10533 changed files with 2588271 additions and 2299373 deletions

View File

@ -14,23 +14,41 @@
#ifndef SRC_SQL_ENGINE_EXPR_OB_EXPR_CONVERT_H_
#define SRC_SQL_ENGINE_EXPR_OB_EXPR_CONVERT_H_
namespace oceanbase {
namespace sql {
class ObExprConvert : public ObFuncExprOperator {
namespace oceanbase
{
namespace sql
{
class ObExprConvert : public ObFuncExprOperator
{
public:
explicit ObExprConvert(common::ObIAllocator& alloc);
explicit ObExprConvert(common::ObIAllocator &alloc);
virtual ~ObExprConvert();
virtual int calc_result_type2(
ObExprResType& type, ObExprResType& type1, ObExprResType& type2, common::ObExprTypeCtx& type_ctx) const;
virtual int calc_result2(
common::ObObj& result, const common::ObObj& obj1, const common::ObObj& obj2, common::ObExprCtx& expr_ctx) const;
virtual int cg_expr(ObExprCGCtx& expr_cg_ctx, const ObRawExpr& raw_expr, ObExpr& rt_expr) const override;
virtual int calc_result_type2(ObExprResType &type,
ObExprResType &type1,
ObExprResType &type2,
common::ObExprTypeCtx &type_ctx) const;
virtual int cg_expr(ObExprCGCtx &expr_cg_ctx, const ObRawExpr &raw_expr,
ObExpr &rt_expr) const override;
virtual common::ObCastMode get_cast_mode() const override { return CM_CHARSET_CONVERT_IGNORE_ERR; };
private:
DISALLOW_COPY_AND_ASSIGN(ObExprConvert);
};
} // namespace sql
} // namespace oceanbase
class ObExprConvertOracle : public ObStringExprOperator
{
public:
explicit ObExprConvertOracle(common::ObIAllocator &alloc);
virtual ~ObExprConvertOracle();
virtual int calc_result_typeN(ObExprResType &type,
ObExprResType *types_array,
int64_t param_num,
common::ObExprTypeCtx &type_ctx) const;
virtual int cg_expr(ObExprCGCtx &op_cg_ctx, const ObRawExpr &raw_expr, ObExpr &rt_expr) const;
static int calc_convert_oracle_expr(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &res_datum);
private:
DISALLOW_COPY_AND_ASSIGN(ObExprConvertOracle);
};
}
}
#endif /* SRC_SQL_ENGINE_EXPR_OB_EXPR_CONVERT_H_ */