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

@ -15,78 +15,49 @@
#include "sql/optimizer/ob_logical_operator.h"
#include "sql/optimizer/ob_log_operator_factory.h"
#include "sql/optimizer/ob_log_plan.h"
#include "sql/resolver/dml/ob_sql_hint.h"
namespace oceanbase {
namespace sql {
class ObLogTempTableAccess : public ObLogicalOperator {
namespace oceanbase
{
namespace sql
{
class ObLogTempTableAccess : public ObLogicalOperator
{
public:
ObLogTempTableAccess(ObLogPlan& plan);
ObLogTempTableAccess(ObLogPlan &plan);
virtual ~ObLogTempTableAccess();
virtual int copy_without_child(ObLogicalOperator*& out) override
{
return clone(out);
}
virtual int allocate_exchange_post(AllocExchContext* ctx) override;
virtual int allocate_expr_post(ObAllocExprContext& ctx) override;
virtual int transmit_op_ordering() override;
virtual bool is_block_op() const override
{
return true;
}
void set_table_id(uint64_t table_id)
{
table_id_ = table_id;
}
uint64_t get_table_id() const
{
return table_id_;
}
inline void set_ref_table_id(uint64_t ref_table_id)
{
ref_table_id_ = ref_table_id;
}
uint64_t get_ref_table_id() const
{
return ref_table_id_;
}
void set_last_access(bool is_last)
{
is_last_access_ = is_last;
}
bool is_last_access() const
{
return is_last_access_;
}
int inner_append_not_produced_exprs(ObRawExprUniqueSet& raw_exprs) const override;
inline common::ObString& get_table_name()
{
return temp_table_name_;
}
inline const common::ObIArray<ObRawExpr*>& get_access_exprs() const
{
return access_exprs_;
}
inline common::ObIArray<ObRawExpr*>& get_access_exprs()
{
return access_exprs_;
}
virtual int print_my_plan_annotation(char* buf, int64_t& buf_len, int64_t& pos, ExplainType type) override;
int generate_access_expr();
virtual int get_op_exprs(ObIArray<ObRawExpr*> &all_exprs) override;
virtual int allocate_expr_post(ObAllocExprContext &ctx) override;
virtual int re_est_cost(EstimateCostInfo &param, double &card, double &cost) override;
virtual bool is_block_op() const override { return false; }
void set_table_id(uint64_t table_id) { table_id_ = table_id; }
uint64_t get_table_id() const { return table_id_; }
inline void set_temp_table_id(uint64_t temp_table_id){ temp_table_id_ = temp_table_id; }
uint64_t get_temp_table_id() const { return temp_table_id_; }
inline common::ObString &get_table_name() { return temp_table_name_; }
inline common::ObString &get_access_name() { return access_name_; }
inline const common::ObIArray<ObRawExpr *> &get_access_exprs() const
{ return access_exprs_; }
inline common::ObIArray<ObRawExpr *> &get_access_exprs()
{ return access_exprs_; }
virtual int print_my_plan_annotation(char *buf,
int64_t &buf_len,
int64_t &pos,
ExplainType type);
private:
DISALLOW_COPY_AND_ASSIGN(ObLogTempTableAccess);
private:
uint64_t table_id_;
uint64_t ref_table_id_;
uint64_t temp_table_id_;
common::ObString temp_table_name_;
bool is_last_access_; // trick part, used to release the memory
common::ObString access_name_;
// base columns to scan
common::ObSEArray<ObRawExpr*, 4, common::ModulePageAllocator, true> access_exprs_;
common::ObSEArray<ObRawExpr *, 4, common::ModulePageAllocator, true> access_exprs_;
};
} // namespace sql
} // namespace oceanbase
}
}
#endif // OCEANBASE_SQL_OB_LOG_TEMP_TABLE_ACCESS_H
#endif // OCEANBASE_SQL_OB_LOG_TEMP_TABLE_ACCESS_H