Optimize operator name with use_rich_format enabled

This commit is contained in:
obdev
2024-02-09 14:05:06 +00:00
committed by ob-robot
parent b7b06563ac
commit ee68fd84f7
7 changed files with 83 additions and 49 deletions

View File

@ -81,7 +81,8 @@ public:
otherstat_3_id_(0),
otherstat_4_id_(0),
otherstat_5_id_(0),
otherstat_6_id_(0)
otherstat_6_id_(0),
enable_rich_format_(false)
{
TraceId* trace_id = common::ObCurTraceId::get_trace_id();
if (NULL != trace_id) {
@ -101,7 +102,7 @@ public:
void set_tenant_id(int64_t tenant_id) { tenant_id_ = tenant_id; }
void set_plan_depth(int64_t plan_depth) { plan_depth_ = plan_depth; }
void set_rt_node_id(int64_t id) { rt_node_id_ = id; }
const char *get_operator_name() const { return get_phy_op_name(op_type_); }
const char *get_operator_name() const { return get_phy_op_name(op_type_, enable_rich_format_); }
ObPhyOperatorType get_operator_type() const { return op_type_; }
int64_t get_op_id() const { return op_id_; }
int64_t get_tenant_id() const { return tenant_id_; }
@ -109,6 +110,7 @@ public:
int64_t get_thread_id() { return thread_id_; }
int64_t get_rt_node_id() { return rt_node_id_;}
int add_rt_monitor_node(ObMonitorNode *node);
void set_rich_format(bool v) { enable_rich_format_ = v; }
TO_STRING_KV(K_(tenant_id), K_(op_id), "op_name", get_operator_name(), K_(thread_id));
public:
int64_t tenant_id_;
@ -146,6 +148,7 @@ public:
int16_t otherstat_4_id_;
int16_t otherstat_5_id_;
int16_t otherstat_6_id_;
bool enable_rich_format_;
};