Merge DAY() system function into opensource branch.

This commit is contained in:
xy0
2021-11-29 15:27:44 +08:00
committed by LINxiansheng
parent 7b9fe43335
commit fc8e532b0b
8 changed files with 25292 additions and 25180 deletions

View File

@ -36,6 +36,12 @@ int ObExprDayOfMonth::calc_dayofmonth(const ObExpr& expr, ObEvalCtx& ctx, ObDatu
return ObExprTimeBase::calc(expr, ctx, expr_datum, DT_MDAY, true, true);
}
ObExprDay::ObExprDay(ObIAllocator &alloc)
: ObExprTimeBase(alloc, DT_MDAY, T_FUN_SYS_DAY, N_DAY){};
ObExprDay::~ObExprDay()
{}
ObExprDayOfWeek::ObExprDayOfWeek(ObIAllocator& alloc)
: ObExprTimeBase(alloc, DT_WDAY, T_FUN_SYS_DAY_OF_WEEK, N_DAY_OF_WEEK){};

View File

@ -29,6 +29,15 @@ private:
DISALLOW_COPY_AND_ASSIGN(ObExprDayOfMonth);
};
class ObExprDay: public ObExprTimeBase {
public:
ObExprDay();
explicit ObExprDay(common::ObIAllocator &alloc);
virtual ~ObExprDay();
private:
DISALLOW_COPY_AND_ASSIGN(ObExprDay);
};
class ObExprDayOfWeek : public ObExprTimeBase {
public:
ObExprDayOfWeek();

View File

@ -685,6 +685,7 @@ void ObExprOperatorFactory::register_expr_operators()
REG_OP(ObExprDegrees);
REG_OP(ObExprWeightString);
REG_OP(ObExprBenchmark);
REG_OP(ObExprDay);
// register oracle system function
REG_OP_ORCL(ObExprSysConnectByPath);
REG_OP_ORCL(ObExprTimestampNvl);