[FEAT MERGE] Functional_index
This commit is contained in:
@ -32,7 +32,7 @@ ObExprWeekOfYear::ObExprWeekOfYear(ObIAllocator& alloc)
|
||||
: ObFuncExprOperator(alloc,
|
||||
T_FUN_SYS_WEEK_OF_YEAR,
|
||||
N_WEEK_OF_YEAR,
|
||||
1, NOT_ROW_DIMENSION)
|
||||
1, NOT_VALID_FOR_GENERATED_COL, NOT_ROW_DIMENSION)
|
||||
{
|
||||
}
|
||||
ObExprWeekOfYear::~ObExprWeekOfYear() {}
|
||||
@ -91,12 +91,19 @@ int ObExprWeekOfYear::calc_weekofyear(const ObExpr &expr, ObEvalCtx &ctx, ObDatu
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObExprWeekOfYear::is_valid_for_generated_column(const ObRawExpr*expr, const common::ObIArray<ObRawExpr *> &exprs, bool &is_valid) const {
|
||||
int ret = OB_SUCCESS;
|
||||
if (OB_FAIL(check_first_param_not_time(exprs, is_valid))) {
|
||||
LOG_WARN("fail to check if first param is time", K(ret), K(exprs));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
ObExprWeekDay::ObExprWeekDay(ObIAllocator& alloc)
|
||||
: ObFuncExprOperator(alloc,
|
||||
T_FUN_SYS_WEEKDAY_OF_DATE,
|
||||
N_WEEKDAY_OF_DATE,
|
||||
1, NOT_ROW_DIMENSION)
|
||||
1, NOT_VALID_FOR_GENERATED_COL, NOT_ROW_DIMENSION)
|
||||
{
|
||||
}
|
||||
ObExprWeekDay::~ObExprWeekDay() {}
|
||||
@ -155,12 +162,20 @@ int ObExprWeekDay::calc_weekday(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &exp
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObExprWeekDay::is_valid_for_generated_column(const ObRawExpr*expr, const common::ObIArray<ObRawExpr *> &exprs, bool &is_valid) const {
|
||||
int ret = OB_SUCCESS;
|
||||
if (OB_FAIL(check_first_param_not_time(exprs, is_valid))) {
|
||||
LOG_WARN("fail to check if first param is time", K(ret), K(exprs));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
ObExprYearWeek::ObExprYearWeek(ObIAllocator& alloc)
|
||||
: ObFuncExprOperator(alloc,
|
||||
T_FUN_SYS_YEARWEEK_OF_DATE,
|
||||
N_YEARWEEK_OF_DATE,
|
||||
ONE_OR_TWO,
|
||||
NOT_ROW_DIMENSION)
|
||||
NOT_VALID_FOR_GENERATED_COL, NOT_ROW_DIMENSION)
|
||||
{
|
||||
}
|
||||
ObExprYearWeek::~ObExprYearWeek() {}
|
||||
@ -323,11 +338,19 @@ int ObExprYearWeek::calc_yearweek(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &e
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObExprYearWeek::is_valid_for_generated_column(const ObRawExpr*expr, const common::ObIArray<ObRawExpr *> &exprs, bool &is_valid) const {
|
||||
int ret = OB_SUCCESS;
|
||||
if (OB_FAIL(check_first_param_not_time(exprs, is_valid))) {
|
||||
LOG_WARN("fail to check if first param is time", K(ret), K(exprs));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
ObExprWeek::ObExprWeek(ObIAllocator& alloc)
|
||||
: ObFuncExprOperator(alloc,
|
||||
T_FUN_SYS_WEEK,
|
||||
N_WEEK,
|
||||
ONE_OR_TWO, NOT_ROW_DIMENSION)
|
||||
ONE_OR_TWO, NOT_VALID_FOR_GENERATED_COL, NOT_ROW_DIMENSION)
|
||||
{
|
||||
}
|
||||
ObExprWeek::~ObExprWeek() {}
|
||||
@ -437,5 +460,13 @@ int ObExprWeek::calc_week(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &expr_datu
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObExprWeek::is_valid_for_generated_column(const ObRawExpr*expr, const common::ObIArray<ObRawExpr *> &exprs, bool &is_valid) const {
|
||||
int ret = OB_SUCCESS;
|
||||
if (OB_FAIL(check_first_param_not_time(exprs, is_valid))) {
|
||||
LOG_WARN("fail to check if first param is time", K(ret), K(exprs));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user