This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0-beta in repository https://gitbox.apache.org/repos/asf/doris.git
commit 43f6dbab248fd2f4f87aa4eebc665e9573bcb482 Author: yiguolei <[email protected]> AuthorDate: Tue Jun 6 08:55:19 2023 +0800 [enhancement](profile) add build get child next time (#20460) Currently, build time not include child(1)->get next time, it is very confusing during shared hash table scenario. So that I add a profile. --------- Co-authored-by: yiguolei <[email protected]> --- be/src/vec/exec/join/vhash_join_node.cpp | 24 ++++++++++++++---------- be/src/vec/exec/join/vjoin_node_base.h | 1 + 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/be/src/vec/exec/join/vhash_join_node.cpp b/be/src/vec/exec/join/vhash_join_node.cpp index cd6bea45e9..670953252d 100644 --- a/be/src/vec/exec/join/vhash_join_node.cpp +++ b/be/src/vec/exec/join/vhash_join_node.cpp @@ -434,6 +434,7 @@ Status HashJoinNode::prepare(RuntimeState* state) { // Build phase _build_phase_profile = runtime_profile()->create_child("BuildPhase", true, true); runtime_profile()->add_child(_build_phase_profile, false, nullptr); + _build_get_next_timer = ADD_TIMER(_build_phase_profile, "BuildGetNextTime"); _build_timer = ADD_TIMER(_build_phase_profile, "BuildTime"); _build_table_timer = ADD_TIMER(_build_phase_profile, "BuildTableTime"); _build_side_merge_block_timer = ADD_TIMER(_build_phase_profile, "BuildSideMergeBlockTime"); @@ -780,8 +781,10 @@ void HashJoinNode::release_resource(RuntimeState* state) { } Status HashJoinNode::_materialize_build_side(RuntimeState* state) { - RETURN_IF_ERROR(child(1)->open(state)); - + { + SCOPED_TIMER(_build_get_next_timer); + RETURN_IF_ERROR(child(1)->open(state)); + } if (_should_build_hash_table) { bool eos = false; Block block; @@ -790,14 +793,15 @@ Status HashJoinNode::_materialize_build_side(RuntimeState* state) { while (!eos && !_short_circuit_for_null_in_probe_side) { block.clear_column_data(); RETURN_IF_CANCELLED(state); - - RETURN_IF_ERROR(child(1)->get_next_after_projects( - state, &block, &eos, - std::bind((Status(ExecNode::*)(RuntimeState*, vectorized::Block*, bool*)) & - ExecNode::get_next, - _children[1], std::placeholders::_1, std::placeholders::_2, - std::placeholders::_3))); - + { + SCOPED_TIMER(_build_get_next_timer); + RETURN_IF_ERROR(child(1)->get_next_after_projects( + state, &block, &eos, + std::bind((Status(ExecNode::*)(RuntimeState*, vectorized::Block*, bool*)) & + ExecNode::get_next, + _children[1], std::placeholders::_1, std::placeholders::_2, + std::placeholders::_3))); + } RETURN_IF_ERROR(sink(state, &block, eos)); } RETURN_IF_ERROR(child(1)->close(state)); diff --git a/be/src/vec/exec/join/vjoin_node_base.h b/be/src/vec/exec/join/vjoin_node_base.h index 6972357083..757670b31e 100644 --- a/be/src/vec/exec/join/vjoin_node_base.h +++ b/be/src/vec/exec/join/vjoin_node_base.h @@ -124,6 +124,7 @@ protected: MutableColumnPtr _tuple_is_null_right_flag_column; RuntimeProfile::Counter* _build_timer; + RuntimeProfile::Counter* _build_get_next_timer; RuntimeProfile::Counter* _probe_timer; RuntimeProfile::Counter* _build_rows_counter; RuntimeProfile::Counter* _probe_rows_counter; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
