dblink_write implement [FEAT MERGE]

Co-authored-by: zzg19950727 <1071026277@qq.com>
Co-authored-by: xianyu-w <707512433@qq.com>
This commit is contained in:
obdev
2023-01-29 16:23:18 +08:00
committed by ob-robot
parent 195ab500ab
commit 814de27a42
226 changed files with 9602 additions and 4087 deletions

View File

@ -14,7 +14,7 @@
#define OCEANBASE_SQL_OB_LOG_LINK_H
#include "sql/optimizer/ob_logical_operator.h"
#include "sql/optimizer/ob_log_plan.h"
namespace oceanbase
{
namespace sql
@ -22,27 +22,41 @@ namespace sql
typedef common::ObIArray<common::ObString> ObStringIArray;
enum LinkType {
NONE = 0,
SELECT,
INSERT,
UPDATE,
DELETE,
MERGE_INTO
};
class ObLogLink : public ObLogicalOperator
{
public:
ObLogLink(ObLogPlan &plan);
virtual ~ObLogLink() {}
virtual int est_cost() override;
virtual int generate_link_sql_post(GenLinkStmtPostContext &link_ctx) override;
virtual int compute_sharding_info() override;
inline const common::ObIArray<ObParamPosIdx> &get_param_infos() const { return param_infos_; }
inline const char *get_stmt_fmt_buf() const { return stmt_fmt_buf_; }
inline int32_t get_stmt_fmt_len() const { return stmt_fmt_len_; }
int gen_link_stmt_param_infos();
virtual int set_link_stmt(const ObDMLStmt* stmt = NULL);
inline void set_reverse_link(bool reverse_link) { is_reverse_link_ = reverse_link; }
inline bool get_reverse_link() { return is_reverse_link_; }
int mark_exec_params(ObDMLStmt *stmt);
protected:
virtual int get_plan_item_info(PlanText &plan_text,
ObSqlPlanItem &plan_item) override;
private:
int print_link_stmt(char *buf, int64_t buf_len);
private:
protected:
common::ObIAllocator &allocator_;
char *stmt_fmt_buf_;
int32_t stmt_fmt_len_;
bool is_reverse_link_;
uint64_t tm_dblink_id_;
common::ObSEArray<ObParamPosIdx, 16, common::ModulePageAllocator, true> param_infos_;
};