Merge DAY() system function into opensource branch.
This commit is contained in:
@ -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){};
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user