fix some sql logical plan bug

This commit is contained in:
zzg19950727
2023-11-21 15:14:59 +00:00
committed by ob-robot
parent 4e25ca5f67
commit 82418cf225
9 changed files with 257 additions and 47 deletions

View File

@ -125,6 +125,7 @@ private:
public:
ObSqlPlan(common::ObIAllocator &allocator);
virtual ~ObSqlPlan();
void set_session_info(ObSQLSessionInfo *session) { session_ = session; }
int store_sql_plan(ObLogPlan* log_plan, ObPhysicalPlan* phy_plan);
int store_sql_plan_for_explain(ObExecContext *ctx,
@ -144,11 +145,15 @@ public:
int format_sql_plan(ObIArray<ObSqlPlanItem*> &sql_plan_infos,
ExplainType type,
const ObExplainDisplayOpt& option,
PlanText &plan_text);
PlanText &plan_text,
const bool alloc_buffer = true);
static int get_plan_outline_info_one_line(PlanText &plan_text,
ObLogPlan* plan);
static int get_plan_used_hint_info_one_line(PlanText &plan_text,
ObLogPlan* plan);
static int plan_text_to_string(PlanText &plan_text,
common::ObString &plan_str);
@ -180,8 +185,8 @@ private:
ObLogPlan* plan,
ObSqlPlanItem* sql_plan_item);
int get_plan_tree_used_hint(PlanText &plan_text,
ObLogicalOperator* op);
static int get_plan_tree_used_hint(PlanText &plan_text,
ObLogicalOperator* op);
int get_qb_name_trace(PlanText &plan_text,
ObLogPlan* plan,
@ -282,6 +287,8 @@ private:
transaction::ObTxDesc *tx_desc,
int64_t nested_count);
const char* get_tree_line(int type);
public:
static int format_one_output_expr(char *buf,
int64_t buf_len,
@ -294,6 +301,7 @@ public:
private:
common::ObIAllocator &allocator_;
ObSQLSessionInfo *session_;
};
} // end of namespace sql