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

@ -15,28 +15,31 @@
#include "sql/engine/expr/ob_expr_operator.h"
namespace oceanbase {
namespace sql {
class ObExprUnixTimestamp : public ObFuncExprOperator {
namespace oceanbase
{
namespace sql
{
class ObExprUnixTimestamp : public ObFuncExprOperator
{
public:
explicit ObExprUnixTimestamp(common::ObIAllocator& alloc);
explicit ObExprUnixTimestamp(common::ObIAllocator &alloc);
virtual ~ObExprUnixTimestamp();
virtual int calc_result_typeN(
ObExprResType& type, ObExprResType* type_array, int64_t param, common::ObExprTypeCtx& type_ctx) const override;
virtual int calc_resultN(
common::ObObj& result, const common::ObObj* date_param, int64_t param, common::ObExprCtx& expr_ctx) const override;
static int calc(
common::ObObj& result, const common::ObObj& dt_date, const ObExprResType& res_type, common::ObCastCtx& cast_ctx);
static int eval_unix_timestamp(const ObExpr& expr, ObEvalCtx& ctx, ObDatum& res);
virtual int cg_expr(ObExprCGCtx& expr_cg_ctx, const ObRawExpr& raw_expr, ObExpr& rt_expr) const override;
virtual int calc_result_typeN(ObExprResType &type,
ObExprResType *type_array,
int64_t param,
common::ObExprTypeCtx &type_ctx) const;
static int eval_unix_timestamp(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &res);
virtual int cg_expr(ObExprCGCtx &expr_cg_ctx, const ObRawExpr &raw_expr,
ObExpr &rt_expr) const override;
private:
int calc_result_type_literal(ObExprResType& type, ObExprResType& type1) const;
int calc_result_type_column(ObExprResType& type, ObExprResType& type1) const;
int calc_result_type_literal(ObExprResType &type,
ObExprResType &type1) const;
int calc_result_type_column(ObExprResType &type,
ObExprResType &type1) const;
// disallow copy
DISALLOW_COPY_AND_ASSIGN(ObExprUnixTimestamp);
};
} // namespace sql
} // namespace oceanbase
}
}
#endif /* SRC_SQL_ENGINE_EXPR_OB_EXPR_UNIX_TIMESTAMP_H_ */