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
commit 34e5030702d3a0693937abcdd9ecf56aef75a8c7 Author: zhiqiang <[email protected]> AuthorDate: Fri May 24 21:28:10 2024 +0800 [bugifx](core) fix logical error of status check in nestedloop join (#35365) --- .../exec/nested_loop_join_probe_operator.cpp | 25 ++++++++-------------- be/src/vec/exec/join/vnested_loop_join_node.h | 25 ++++++++-------------- 2 files changed, 18 insertions(+), 32 deletions(-) diff --git a/be/src/pipeline/exec/nested_loop_join_probe_operator.cpp b/be/src/pipeline/exec/nested_loop_join_probe_operator.cpp index c7afa2c399c..dd441e7db22 100644 --- a/be/src/pipeline/exec/nested_loop_join_probe_operator.cpp +++ b/be/src/pipeline/exec/nested_loop_join_probe_operator.cpp @@ -19,6 +19,7 @@ #include <memory> +#include "common/exception.h" #include "pipeline/exec/operator.h" #include "vec/columns/column_filter_helper.h" #include "vec/core/block.h" @@ -177,15 +178,11 @@ Status NestedLoopJoinProbeLocalState::generate_join_block_data(RuntimeState* sta } if constexpr (set_probe_side_flag) { - Status status; - RETURN_IF_CATCH_EXCEPTION( - (status = _do_filtering_and_update_visited_flags< - set_build_side_flag, set_probe_side_flag, ignore_null>( - &_join_block, !p._is_left_semi_anti))); + RETURN_IF_ERROR_OR_CATCH_EXCEPTION( + (_do_filtering_and_update_visited_flags<set_build_side_flag, + set_probe_side_flag, ignore_null>( + &_join_block, !p._is_left_semi_anti))); _update_additional_flags(&_join_block); - if (!status.ok()) { - return status; - } // If this join operation is left outer join or full outer join, when // `_left_side_process_count`, means all rows from build // side have been joined with _left_side_process_count, we should output current @@ -201,15 +198,11 @@ Status NestedLoopJoinProbeLocalState::generate_join_block_data(RuntimeState* sta } if constexpr (!set_probe_side_flag) { - Status status; - RETURN_IF_CATCH_EXCEPTION( - (status = _do_filtering_and_update_visited_flags<set_build_side_flag, - set_probe_side_flag, ignore_null>( - &_join_block, !p._is_right_semi_anti))); + RETURN_IF_ERROR_OR_CATCH_EXCEPTION( + (_do_filtering_and_update_visited_flags<set_build_side_flag, set_probe_side_flag, + ignore_null>(&_join_block, + !p._is_right_semi_anti))); _update_additional_flags(&_join_block); - if (!status.ok()) { - return status; - } } if constexpr (set_build_side_flag) { diff --git a/be/src/vec/exec/join/vnested_loop_join_node.h b/be/src/vec/exec/join/vnested_loop_join_node.h index 18bc901222f..5048d58bb04 100644 --- a/be/src/vec/exec/join/vnested_loop_join_node.h +++ b/be/src/vec/exec/join/vnested_loop_join_node.h @@ -28,6 +28,7 @@ #include <stack> #include <vector> +#include "common/exception.h" #include "common/status.h" #include "runtime/runtime_state.h" #include "runtime/thread_context.h" @@ -152,15 +153,11 @@ private: } if constexpr (set_probe_side_flag) { - Status status; - RETURN_IF_CATCH_EXCEPTION( - (status = _do_filtering_and_update_visited_flags< - set_build_side_flag, set_probe_side_flag, ignore_null>( - &_join_block, !_is_left_semi_anti))); + RETURN_IF_ERROR_OR_CATCH_EXCEPTION( + (_do_filtering_and_update_visited_flags<set_build_side_flag, + set_probe_side_flag, ignore_null>( + &_join_block, !_is_left_semi_anti))); _update_additional_flags(&_join_block); - if (!status.ok()) { - return status; - } // If this join operation is left outer join or full outer join, when // `_left_side_process_count`, means all rows from build // side have been joined with _left_side_process_count, we should output current @@ -175,15 +172,11 @@ private: } if constexpr (!set_probe_side_flag) { - Status status; - RETURN_IF_CATCH_EXCEPTION( - (status = _do_filtering_and_update_visited_flags< - set_build_side_flag, set_probe_side_flag, ignore_null>( - &_join_block, !_is_right_semi_anti))); + RETURN_IF_ERROR_OR_CATCH_EXCEPTION( + (_do_filtering_and_update_visited_flags<set_build_side_flag, + set_probe_side_flag, ignore_null>( + &_join_block, !_is_right_semi_anti))); _update_additional_flags(&_join_block); - if (!status.ok()) { - return status; - } } if constexpr (set_build_side_flag) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
