patch 4.0
This commit is contained in:
@ -14,29 +14,30 @@
|
||||
|
||||
#include "ob_expr_remove_const.h"
|
||||
|
||||
namespace oceanbase {
|
||||
namespace oceanbase
|
||||
{
|
||||
using namespace common;
|
||||
namespace sql {
|
||||
namespace sql
|
||||
{
|
||||
|
||||
ObExprRemoveConst::ObExprRemoveConst(ObIAllocator& alloc)
|
||||
: ObFuncExprOperator(alloc, T_FUN_SYS_REMOVE_CONST, N_REMOVE_CONST, 1, NOT_ROW_DIMENSION)
|
||||
{}
|
||||
ObExprRemoveConst::ObExprRemoveConst(ObIAllocator &alloc)
|
||||
: ObFuncExprOperator(alloc, T_FUN_SYS_REMOVE_CONST, N_REMOVE_CONST, 1, NOT_ROW_DIMENSION,
|
||||
INTERNAL_IN_MYSQL_MODE, INTERNAL_IN_ORACLE_MODE)
|
||||
{
|
||||
}
|
||||
|
||||
int ObExprRemoveConst::calc_result_type1(ObExprResType& type, ObExprResType& arg, common::ObExprTypeCtx&) const
|
||||
int ObExprRemoveConst::calc_result_type1(ObExprResType &type,
|
||||
ObExprResType &arg,
|
||||
common::ObExprTypeCtx &) const
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
type = arg;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObExprRemoveConst::calc_result1(common::ObObj& result, const common::ObObj& arg, common::ObExprCtx&) const
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
result = arg;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObExprRemoveConst::cg_expr(ObExprCGCtx&, const ObRawExpr&, ObExpr& rt_expr) const
|
||||
int ObExprRemoveConst::cg_expr(ObExprCGCtx &,
|
||||
const ObRawExpr &,
|
||||
ObExpr &rt_expr) const
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
CK(1 == rt_expr.arg_cnt_);
|
||||
@ -44,10 +45,12 @@ int ObExprRemoveConst::cg_expr(ObExprCGCtx&, const ObRawExpr&, ObExpr& rt_expr)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObExprRemoveConst::eval_remove_const(const ObExpr& expr, ObEvalCtx& ctx, ObDatum& expr_datum)
|
||||
int ObExprRemoveConst::eval_remove_const(const ObExpr &expr,
|
||||
ObEvalCtx &ctx,
|
||||
ObDatum &expr_datum)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObDatum* arg = NULL;
|
||||
ObDatum *arg = NULL;
|
||||
if (OB_FAIL(expr.eval_param_value(ctx, arg))) {
|
||||
LOG_WARN("expr evaluate parameter failed", K(ret));
|
||||
} else {
|
||||
@ -56,5 +59,5 @@ int ObExprRemoveConst::eval_remove_const(const ObExpr& expr, ObEvalCtx& ctx, ObD
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace sql
|
||||
} // namespace oceanbase
|
||||
} // namespace sql
|
||||
} // namespace oceanbase
|
||||
|
||||
Reference in New Issue
Block a user