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,32 +14,39 @@
#define SRC_SQL_ENGINE_EXPR_OB_EXPR_FROM_DAYS_H_
#include "sql/engine/expr/ob_expr_operator.h"
namespace oceanbase {
namespace sql {
class ObExprFromDays : public ObFuncExprOperator {
namespace oceanbase
{
namespace sql
{
class ObExprFromDays : public ObFuncExprOperator
{
public:
explicit ObExprFromDays(common::ObIAllocator& alloc);
explicit ObExprFromDays(common::ObIAllocator &alloc);
virtual ~ObExprFromDays();
virtual int calc_result_type1(ObExprResType& type, ObExprResType& date, common::ObExprTypeCtx& type_ctx) const;
virtual int calc_result1(common::ObObj& result, 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_fromdays(const ObExpr& expr, ObEvalCtx& ctx, ObDatum& expr_datum);
virtual int calc_result_type1(ObExprResType &type,
ObExprResType &date,
common::ObExprTypeCtx &type_ctx) const;
virtual int cg_expr(ObExprCGCtx &op_cg_ctx,
const ObRawExpr &raw_expr,
ObExpr &rt_expr) const override;
static int calc_fromdays(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &expr_datum);
private:
DISALLOW_COPY_AND_ASSIGN(ObExprFromDays);
};
inline int ObExprFromDays::calc_result_type1(
ObExprResType& type, ObExprResType& date, common::ObExprTypeCtx& type_ctx) const
inline int ObExprFromDays::calc_result_type1(ObExprResType &type, ObExprResType &date, common::ObExprTypeCtx &type_ctx) const
{
UNUSED(type_ctx);
UNUSED(date);
type.set_date();
type.set_scale(common::DEFAULT_SCALE_FOR_DATE);
// set calc type
//set calc type
date.set_calc_type(common::ObInt32Type);
return common::OB_SUCCESS;
}
} // namespace sql
} // namespace oceanbase
}
}
#endif /* SRC_SQL_ENGINE_EXPR_OB_EXPR_FROM_DAYS_H_ */