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,17 +14,21 @@
using namespace oceanbase::common;
namespace oceanbase {
namespace sql {
namespace oceanbase
{
namespace sql
{
ObExprObVersion::ObExprObVersion(ObIAllocator& alloc)
: ObStringExprOperator(alloc, T_FUN_SYS_OB_VERSION, N_OB_VERSION, 0)
{}
ObExprObVersion::ObExprObVersion(ObIAllocator &alloc)
: ObStringExprOperator(alloc, T_FUN_SYS_OB_VERSION, N_OB_VERSION, 0)
{
}
ObExprObVersion::~ObExprObVersion()
{}
{
}
int ObExprObVersion::calc_result_type0(ObExprResType& type, ObExprTypeCtx& type_ctx) const
int ObExprObVersion::calc_result_type0(ObExprResType &type, ObExprTypeCtx &type_ctx) const
{
UNUSED(type_ctx);
type.set_varchar();
@ -34,13 +38,29 @@ int ObExprObVersion::calc_result_type0(ObExprResType& type, ObExprTypeCtx& type_
return OB_SUCCESS;
}
int ObExprObVersion::calc_result0(ObObj& result, ObExprCtx& expr_ctx) const
int ObExprObVersion::eval_version(const ObExpr &expr,
ObEvalCtx &ctx,
ObDatum &expr_datum)
{
UNUSED(expr_ctx);
result.set_varchar(common::ObString(PACKAGE_VERSION));
result.set_collation(result_type_);
return OB_SUCCESS;
UNUSED(expr);
UNUSED(ctx);
int ret = OB_SUCCESS;
if (OB_SUCC(ret)) {
expr_datum.set_string(common::ObString(PACKAGE_VERSION));
}
return ret;
}
} // namespace sql
} // namespace oceanbase
int ObExprObVersion::cg_expr(ObExprCGCtx &op_cg_ctx,
const ObRawExpr &raw_expr,
ObExpr &rt_expr) const
{
UNUSED(raw_expr);
UNUSED(op_cg_ctx);
int ret = OB_SUCCESS;
rt_expr.eval_func_ = ObExprObVersion::eval_version;
return ret;
}
} // namespace sql
} // namespace oceanbase