patch 4.0
This commit is contained in:
@ -16,46 +16,40 @@
|
||||
#include "sql/engine/expr/ob_expr_operator.h"
|
||||
#include "share/object/ob_obj_cast.h"
|
||||
|
||||
namespace oceanbase {
|
||||
namespace sql {
|
||||
class ObExprField : public ObVectorExprOperator {
|
||||
namespace oceanbase
|
||||
{
|
||||
namespace sql
|
||||
{
|
||||
class ObExprField : public ObVectorExprOperator
|
||||
{
|
||||
public:
|
||||
explicit ObExprField(common::ObIAllocator& alloc);
|
||||
virtual ~ObExprField(){};
|
||||
virtual int assign(const ObExprOperator& other);
|
||||
|
||||
explicit ObExprField(common::ObIAllocator &alloc);
|
||||
virtual ~ObExprField() {};
|
||||
virtual int assign(const ObExprOperator &other);
|
||||
public:
|
||||
// serialize and deserialize
|
||||
virtual int serialize(char* buf, const int64_t buf_len, int64_t& pos) const;
|
||||
virtual int deserialize(const char* buf, const int64_t data_len, int64_t& pos);
|
||||
//serialize and deserialize
|
||||
virtual int serialize(char *buf, const int64_t buf_len, int64_t &pos) const;
|
||||
virtual int deserialize(const char *buf, const int64_t data_len, int64_t &pos);
|
||||
virtual int64_t get_serialize_size() const;
|
||||
|
||||
public:
|
||||
virtual int calc_result_typeN(
|
||||
ObExprResType& type, ObExprResType* type_stack, int64_t param_num, common::ObExprTypeCtx& type_ctx) const;
|
||||
virtual int calc_result_typeN(ObExprResType &type,
|
||||
ObExprResType *type_stack,
|
||||
int64_t param_num,
|
||||
common::ObExprTypeCtx &type_ctx) const;
|
||||
|
||||
virtual int calc_resultN(
|
||||
common::ObObj& result, const common::ObObj* obj_stack, int64_t param_num, common::ObExprCtx& expr_ctx) const;
|
||||
|
||||
OB_INLINE int calc_without_cast(
|
||||
common::ObObj& result, const common::ObObj* obj_stack, int64_t param_num, common::ObExprCtx& expr_ctx) const;
|
||||
OB_INLINE int calc_with_cast(
|
||||
common::ObObj& result, const common::ObObj* obj_stack, int64_t param_num, common::ObExprCtx& expr_ctx) const;
|
||||
void set_need_cast(bool need_cast)
|
||||
{
|
||||
need_cast_ = need_cast;
|
||||
}
|
||||
|
||||
virtual int cg_expr(ObExprCGCtx& op_cg_ctx, const ObRawExpr& raw_expr, ObExpr& rt_expr) const override;
|
||||
static int eval_field(const ObExpr& expr, ObEvalCtx& ctx, ObDatum& expr_datum);
|
||||
void set_need_cast(bool need_cast) {need_cast_ = need_cast;}
|
||||
|
||||
virtual int cg_expr(ObExprCGCtx &op_cg_ctx,
|
||||
const ObRawExpr &raw_expr,
|
||||
ObExpr &rt_expr) const override;
|
||||
static int eval_field(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &expr_datum);
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(ObExprField);
|
||||
|
||||
private:
|
||||
bool need_cast_;
|
||||
};
|
||||
|
||||
} // namespace sql
|
||||
} // namespace oceanbase
|
||||
#endif // OCEANBASE_SQL_ENGINE_EXPR_OB_EXPR_FIELD_
|
||||
} // namespace sql
|
||||
} // namespace oceanbase
|
||||
#endif // OCEANBASE_SQL_ENGINE_EXPR_OB_EXPR_FIELD_
|
||||
|
||||
Reference in New Issue
Block a user