diff --git a/src/sql/engine/join/hash_join/ob_hash_join_vec_op.cpp b/src/sql/engine/join/hash_join/ob_hash_join_vec_op.cpp index fc75b05ace..834895e1c0 100644 --- a/src/sql/engine/join/hash_join/ob_hash_join_vec_op.cpp +++ b/src/sql/engine/join/hash_join/ob_hash_join_vec_op.cpp @@ -829,8 +829,8 @@ int ObHashJoinVecOp::build_hash_table_for_nest_loop(int64_t &num_left_rows) int64_t memory_bound = std::max(remain_data_memory_size_, hj_part->get_row_store().get_max_blk_size()); const int64_t row_bound = min(hash_table.get_row_count(), hash_table.get_nbuckets() / 2); - ObTempRowStore::IterationAge iter_age; - hj_part->set_iteration_age(iter_age); + hj_part->set_iteration_age(iter_age_); + iter_age_.inc(); JoinPartitionRowIter left_iter(hj_part, row_bound, memory_bound); ret = hash_table.build(left_iter, jt_ctx_); } @@ -1212,8 +1212,8 @@ int ObHashJoinVecOp::build_hash_table_in_memory(int64_t &num_left_rows) } else if (OB_FAIL(prepare_hash_table())) { LOG_WARN("failed to prepare hash table", K(ret)); } else { - ObTempRowStore::IterationAge iter_age; - hj_part->set_iteration_age(iter_age); + hj_part->set_iteration_age(iter_age_); + iter_age_.inc(); JoinPartitionRowIter left_iter(hj_part); ret = hash_table.build(left_iter, jt_ctx_); } diff --git a/src/sql/engine/join/hash_join/ob_hash_join_vec_op.h b/src/sql/engine/join/hash_join/ob_hash_join_vec_op.h index cc936289be..7b36445427 100644 --- a/src/sql/engine/join/hash_join/ob_hash_join_vec_op.h +++ b/src/sql/engine/join/hash_join/ob_hash_join_vec_op.h @@ -600,6 +600,7 @@ private: bool skip_right_null_; OutputInfo output_info_; + ObTempRowStore::IterationAge iter_age_; }; } // end namespace sql