fix compile warnings

This commit is contained in:
gm
2021-06-16 14:53:52 +08:00
committed by MizuhaHimuraki
parent ad8465b5ce
commit 8c4a2f26a6
79 changed files with 2878 additions and 2575 deletions

View File

@ -23,23 +23,33 @@ class ObExprExtract : public ObFuncExprOperator {
public:
explicit ObExprExtract(common::ObIAllocator& alloc);
virtual ~ObExprExtract();
virtual int calc_result_type2(
ObExprResType& type, ObExprResType& date_unit, ObExprResType& date, common::ObExprTypeCtx& type_ctx) const;
virtual int calc_result_type2(ObExprResType &type,
ObExprResType &date_unit,
ObExprResType &date,
common::ObExprTypeCtx &type_ctx) const override;
template <typename T>
static int calc(T& result, const int64_t date_unit, const T& date, common::ObObjType date_type,
const common::ObCastMode cast_mode, const common::ObTimeZoneInfo* tz_info, const int64_t cur_ts_value);
template <typename T>
static int calc_oracle(T& result, const int64_t date_unit, const T& date, common::ObObjType type,
const ObSQLSessionInfo* session, common::ObIAllocator* calc_buf);
virtual int calc_result2(common::ObObj& result, const common::ObObj& date_unit, const common::ObObj& date,
common::ObExprCtx& expr_ctx) const;
virtual int cg_expr(ObExprCGCtx& op_cg_ctx, const ObRawExpr& raw_expr, ObExpr& rt_expr) const override;
static int calc_extract_oracle(const ObExpr& expr, ObEvalCtx& ctx, ObDatum& expr_datum);
static int calc_extract_mysql(const ObExpr& expr, ObEvalCtx& ctx, ObDatum& expr_datum);
private:
int set_result_type_oracle(
common::ObExprTypeCtx& type_ctx, const ObExprResType& date_unit, ObExprResType& res_type) const;
static int calc_oracle(T &result,
const int64_t date_unit,
const T &date,
common::ObObjType type,
const ObSQLSessionInfo *session,
common::ObIAllocator *calc_buf);
virtual int calc_result2(common::ObObj &result,
const common::ObObj &date_unit,
const common::ObObj &date,
common::ObExprCtx &expr_ctx) const override;
virtual int cg_expr(ObExprCGCtx &op_cg_ctx,
const ObRawExpr &raw_expr,
ObExpr &rt_expr) const override;
static int calc_extract_oracle(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &expr_datum);
static int calc_extract_mysql(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &expr_datum);
private:
int set_result_type_oracle(common::ObExprTypeCtx &type_ctx,
const ObExprResType &date_unit,
ObExprResType &res_type) const;
// disallow copy
DISALLOW_COPY_AND_ASSIGN(ObExprExtract);
};