diff --git a/src/sql/code_generator/ob_static_engine_cg.cpp b/src/sql/code_generator/ob_static_engine_cg.cpp index 5b04ba2e66..62f0c102ed 100644 --- a/src/sql/code_generator/ob_static_engine_cg.cpp +++ b/src/sql/code_generator/ob_static_engine_cg.cpp @@ -2665,8 +2665,8 @@ int ObStaticEngineCG::generate_spec(ObLogGranuleIterator &op, ObGranuleIteratorS if (log_op_def::LOG_TABLE_SCAN == child_log_op->get_type()) { ObLogTableScan *log_tsc = NULL; log_tsc = static_cast(child_log_op); - //这里拿ref_table_id的行为是为了和table scan拿partition service的行为一致 - spec.set_related_id(log_tsc->get_ref_table_id()); + //这里拿index_table_id和table_scan->get_loc_ref_table_id保持一致。 + spec.set_related_id(log_tsc->get_index_table_id()); } ObPhyPlanType execute_type = spec.plan_->get_plan_type(); if (execute_type == OB_PHY_PLAN_LOCAL) { diff --git a/src/sql/engine/px/ob_granule_iterator_op.cpp b/src/sql/engine/px/ob_granule_iterator_op.cpp index da38ba5339..30a9061f11 100644 --- a/src/sql/engine/px/ob_granule_iterator_op.cpp +++ b/src/sql/engine/px/ob_granule_iterator_op.cpp @@ -128,7 +128,7 @@ OB_DEF_SERIALIZE_SIZE(ObGIOpInput) } OB_SERIALIZE_MEMBER((ObGranuleIteratorSpec, ObOpSpec), - ref_table_id_, + index_table_id_, tablet_size_, affinitize_, partition_wise_join_, @@ -143,7 +143,7 @@ OB_SERIALIZE_MEMBER((ObGranuleIteratorSpec, ObOpSpec), ObGranuleIteratorSpec::ObGranuleIteratorSpec(ObIAllocator &alloc, const ObPhyOperatorType type) : ObOpSpec(alloc, type), - ref_table_id_(OB_INVALID_ID), + index_table_id_(OB_INVALID_ID), tablet_size_(common::OB_DEFAULT_TABLET_SIZE), affinitize_(false), partition_wise_join_(false), @@ -480,7 +480,7 @@ int ObGranuleIteratorOp::try_get_rows(const int64_t max_row_cnt) if (!is_vectorized()) { if (OB_FAIL(child_->get_next_row())) { LOG_DEBUG("failed to get new row", K(ret), - K(MY_SPEC.affinitize_), K(MY_SPEC.ref_table_id_), K(worker_id_)); + K(MY_SPEC.affinitize_), K(MY_SPEC.index_table_id_), K(worker_id_)); if (OB_ITER_END != ret) { LOG_WARN("try fetch task failed", K(ret)); } else { @@ -489,7 +489,7 @@ int ObGranuleIteratorOp::try_get_rows(const int64_t max_row_cnt) } } else { LOG_DEBUG("get new row", K(ret), - K(MY_SPEC.affinitize_), K(MY_SPEC.ref_table_id_), K(worker_id_)); + K(MY_SPEC.affinitize_), K(MY_SPEC.index_table_id_), K(worker_id_)); got_next_row = true; } } else { @@ -1030,7 +1030,7 @@ int ObGranuleIteratorOp::fetch_normal_pw_task_infos(const common::ObIArrayschema_guard_->get_table_schema( - MTL_ID(), ref_table_id, table_schema))) { + MTL_ID(), index_table_id, table_schema))) { LOG_WARN("fail to get table schema", K(ret)); } else if (OB_ISNULL(table_schema)) { ret = OB_SCHEMA_ERROR; - LOG_WARN("null table schema", K(MTL_ID()), K(ref_table_id)); + LOG_WARN("null table schema", K(MTL_ID()), K(index_table_id)); } else if (PARTITION_LEVEL_TWO != table_schema->get_part_level()) { ret = OB_ERR_UNEXPECTED; LOG_WARN("unexpected part level", K(ret)); diff --git a/src/sql/engine/px/ob_granule_iterator_op.h b/src/sql/engine/px/ob_granule_iterator_op.h index 85c3063217..109e7c4b44 100644 --- a/src/sql/engine/px/ob_granule_iterator_op.h +++ b/src/sql/engine/px/ob_granule_iterator_op.h @@ -84,9 +84,9 @@ public: ~ObGranuleIteratorSpec() {} INHERIT_TO_STRING_KV("op_spec", ObOpSpec, - K_(ref_table_id), K_(tablet_size), K_(affinitize), K_(access_all)); + K_(index_table_id), K_(tablet_size), K_(affinitize), K_(access_all)); - void set_related_id(uint64_t ref_id) { ref_table_id_ = ref_id; } + void set_related_id(uint64_t index_id) { index_table_id_ = index_id; } void set_tablet_size(int64_t tablet_size) { tablet_size_ = tablet_size; } int64_t get_tablet_size() { return tablet_size_; } @@ -104,7 +104,7 @@ public: // 目前同时保留了这两个结构,4.2上可以直接删除pw_op_tscs_和所有引用到的地方 inline bool full_partition_wise() const { return partition_wise_join_ && (!affinitize_ || pw_op_tscs_.count() > 1 || pw_dml_tsc_ids_.count() > 1); } public: - uint64_t ref_table_id_; + uint64_t index_table_id_; int64_t tablet_size_; // affinitize用于表示线程和任务是否有进行绑定。 bool affinitize_;