patch 4.0
This commit is contained in:
@ -14,58 +14,48 @@
|
||||
#define _OB_LOG_FUNCTION_TABLE_H
|
||||
#include "sql/optimizer/ob_logical_operator.h"
|
||||
|
||||
namespace oceanbase {
|
||||
namespace sql {
|
||||
class ObLogFunctionTable : public ObLogicalOperator {
|
||||
namespace oceanbase
|
||||
{
|
||||
namespace sql
|
||||
{
|
||||
class ObLogFunctionTable : public ObLogicalOperator
|
||||
{
|
||||
public:
|
||||
ObLogFunctionTable(ObLogPlan& plan) : ObLogicalOperator(plan), table_id_(OB_INVALID_ID), value_expr_(NULL)
|
||||
{}
|
||||
|
||||
virtual ~ObLogFunctionTable()
|
||||
{}
|
||||
|
||||
virtual int allocate_exchange_post(AllocExchContext* ctx) override;
|
||||
virtual int copy_without_child(ObLogicalOperator*& out) override;
|
||||
void add_values_expr(ObRawExpr* expr)
|
||||
{
|
||||
value_expr_ = expr;
|
||||
}
|
||||
const ObRawExpr* get_value_expr() const
|
||||
{
|
||||
return value_expr_;
|
||||
}
|
||||
ObRawExpr* get_value_expr()
|
||||
{
|
||||
return value_expr_;
|
||||
}
|
||||
virtual int est_cost() override;
|
||||
virtual int compute_op_ordering() override;
|
||||
virtual int compute_equal_set() override;
|
||||
virtual int compute_fd_item_set() override;
|
||||
virtual int compute_table_set() override;
|
||||
uint64_t hash(uint64_t seed) const override;
|
||||
int generate_access_exprs(ObIArray<ObRawExpr*>& access_exprs) const;
|
||||
virtual int allocate_expr_pre(ObAllocExprContext& ctx) override;
|
||||
virtual int allocate_expr_post(ObAllocExprContext& ctx) override;
|
||||
virtual int check_output_dep_specific(ObRawExprCheckDep& checker) override;
|
||||
void set_table_id(uint64_t table_id)
|
||||
{
|
||||
table_id_ = table_id;
|
||||
}
|
||||
uint64_t get_table_id() const
|
||||
{
|
||||
return table_id_;
|
||||
}
|
||||
int inner_append_not_produced_exprs(ObRawExprUniqueSet& raw_exprs) const override;
|
||||
|
||||
ObLogFunctionTable(ObLogPlan &plan)
|
||||
: ObLogicalOperator(plan),
|
||||
table_id_(OB_INVALID_ID),
|
||||
value_expr_(NULL),
|
||||
table_name_(),
|
||||
access_exprs_() { }
|
||||
virtual ~ObLogFunctionTable() {}
|
||||
void add_values_expr(ObRawExpr* expr) { value_expr_ = expr; }
|
||||
const ObRawExpr* get_value_expr() const { return value_expr_; }
|
||||
ObRawExpr* get_value_expr() { return value_expr_; }
|
||||
virtual uint64_t hash(uint64_t seed) const override;
|
||||
int generate_access_exprs();
|
||||
ObIArray<ObRawExpr*> &get_access_exprs() { return access_exprs_; }
|
||||
virtual int get_op_exprs(ObIArray<ObRawExpr*> &all_exprs) override;
|
||||
virtual int allocate_expr_post(ObAllocExprContext &ctx) override;
|
||||
void set_table_id(uint64_t table_id) { table_id_ = table_id; }
|
||||
uint64_t get_table_id() const { return table_id_; }
|
||||
/**
|
||||
* Get table name
|
||||
*/
|
||||
inline common::ObString &get_table_name() { return table_name_; }
|
||||
inline const common::ObString &get_table_name() const { return table_name_; }
|
||||
inline void set_table_name(const common::ObString &table_name) { table_name_ = table_name; }
|
||||
private:
|
||||
virtual int print_my_plan_annotation(char* buf, int64_t& buf_len, int64_t& pos, ExplainType type) override;
|
||||
|
||||
virtual int print_my_plan_annotation(char *buf,
|
||||
int64_t &buf_len,
|
||||
int64_t &pos,
|
||||
ExplainType type);
|
||||
private:
|
||||
uint64_t table_id_;
|
||||
ObRawExpr* value_expr_;
|
||||
common::ObString table_name_;
|
||||
common::ObSEArray<ObRawExpr*, 4, common::ModulePageAllocator, true> access_exprs_;
|
||||
DISALLOW_COPY_AND_ASSIGN(ObLogFunctionTable);
|
||||
};
|
||||
} // namespace sql
|
||||
} // namespace oceanbase
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user