This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new 4288f09e8cf [fix](debug_point) Add debug point:reached_limit_early & return_empty_block (#38328) 4288f09e8cf is described below commit 4288f09e8cff4a1f92506117f2d4f9dd888c739b Author: Jerry Hu <mrh...@gmail.com> AuthorDate: Thu Jul 25 14:46:40 2024 +0800 [fix](debug_point) Add debug point:reached_limit_early & return_empty_block (#38328) ## Proposed changes pick #38127 and #37629 --- be/src/pipeline/pipeline_x/operator.cpp | 22 ++++++++++++++++++++++ be/src/pipeline/pipeline_x/operator.h | 2 ++ 2 files changed, 24 insertions(+) diff --git a/be/src/pipeline/pipeline_x/operator.cpp b/be/src/pipeline/pipeline_x/operator.cpp index e577fe707fe..a8902cf2321 100644 --- a/be/src/pipeline/pipeline_x/operator.cpp +++ b/be/src/pipeline/pipeline_x/operator.cpp @@ -80,6 +80,7 @@ #include "pipeline/pipeline_x/local_exchange/local_exchange_source_operator.h" #include "util/debug_util.h" #include "util/runtime_profile.h" +#include "util/string_util.h" namespace doris::pipeline { @@ -269,6 +270,17 @@ Status OperatorXBase::do_projections(RuntimeState* state, vectorized::Block* ori Status OperatorXBase::get_block_after_projects(RuntimeState* state, vectorized::Block* block, bool* eos) { + DBUG_EXECUTE_IF("Pipeline::return_empty_block", { + if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" || + this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" || + this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" || + this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") { + if (_debug_point_count++ % 2 == 0) { + return Status::OK(); + } + } + }); + auto local_state = state->get_local_state(operator_id()); if (_output_row_descriptor) { local_state->clear_origin_block(); @@ -290,6 +302,16 @@ void PipelineXLocalStateBase::reached_limit(vectorized::Block* block, bool* eos) *eos = true; } + DBUG_EXECUTE_IF("Pipeline::reached_limit_early", { + auto op_name = to_lower(_parent->_op_name); + auto arg_op_name = dp->param<std::string>("op_name"); + arg_op_name = to_lower(arg_op_name); + + if (op_name == arg_op_name) { + *eos = true; + } + }); + if (auto rows = block->rows()) { _num_rows_returned += rows; COUNTER_UPDATE(_blocks_returned_counter, 1); diff --git a/be/src/pipeline/pipeline_x/operator.h b/be/src/pipeline/pipeline_x/operator.h index 304d3051214..72f47b576f6 100644 --- a/be/src/pipeline/pipeline_x/operator.h +++ b/be/src/pipeline/pipeline_x/operator.h @@ -365,6 +365,8 @@ protected: int64_t _limit; // -1: no limit + uint32_t _debug_point_count = 0; + std::string _op_name; bool _ignore_data_distribution = false; int _parallel_tasks = 0; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org