This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 1d863159330 [bugifx](core) fix logical error of status check in 
nestedloop join (#35365)
1d863159330 is described below

commit 1d86315933053d6a94a95c6c54c5bda9c8761219
Author: zhiqiang <seuhezhiqi...@163.com>
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 819e8f67616..7dc31cabddb 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"
@@ -164,15 +165,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
@@ -188,15 +185,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: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to