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

gabriellee 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 5eb9e10b51 [pipelineX](pick) pick 2 PRs to fix bugs (#24117)
5eb9e10b51 is described below

commit 5eb9e10b51c1c697a9f8caa9d7b5798230af78ee
Author: Gabriel <[email protected]>
AuthorDate: Sat Sep 9 23:10:46 2023 +0800

    [pipelineX](pick) pick 2 PRs to fix bugs (#24117)
---
 .../exec/nested_loop_join_probe_operator.cpp       | 26 +++++++++++++---------
 1 file changed, 15 insertions(+), 11 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 0d025f6669..43d684effb 100644
--- a/be/src/pipeline/exec/nested_loop_join_probe_operator.cpp
+++ b/be/src/pipeline/exec/nested_loop_join_probe_operator.cpp
@@ -125,9 +125,7 @@ template <typename JoinOpType, bool set_build_side_flag, 
bool set_probe_side_fla
 Status NestedLoopJoinProbeLocalState::generate_join_block_data(RuntimeState* 
state,
                                                                JoinOpType& 
join_op_variants) {
     auto& p = _parent->cast<NestedLoopJoinProbeOperatorX>();
-    constexpr bool ignore_null = JoinOpType::value == TJoinOp::LEFT_ANTI_JOIN 
||
-                                 JoinOpType::value == 
TJoinOp::NULL_AWARE_LEFT_ANTI_JOIN ||
-                                 JoinOpType::value == TJoinOp::RIGHT_ANTI_JOIN;
+    constexpr bool ignore_null = JoinOpType::value == 
TJoinOp::NULL_AWARE_LEFT_ANTI_JOIN;
     _left_block_start_pos = _left_block_pos;
     _left_side_process_count = 0;
     DCHECK(!_need_more_input_data || !_matched_rows_done);
@@ -247,7 +245,7 @@ void 
NestedLoopJoinProbeLocalState::_finalize_current_phase(vectorized::MutableB
         DCHECK(!p._is_mark_join);
         auto build_block_sz = _shared_state->build_blocks.size();
         size_t i = _output_null_idx_build_side;
-        for (; i < build_block_sz and column_size < batch_size; i++) {
+        for (; i < build_block_sz && column_size < batch_size; i++) {
             const auto& cur_block = _shared_state->build_blocks[i];
             const auto* __restrict cur_visited_flags =
                     assert_cast<vectorized::ColumnUInt8*>(
@@ -341,17 +339,23 @@ void 
NestedLoopJoinProbeLocalState::_finalize_current_phase(vectorized::MutableB
                             *dst_columns[dst_columns.size() - 1])
                             .get_data();
             mark_data.reserve(mark_data.size() + _left_side_process_count);
-            DCHECK_LT(_left_block_pos, _child_block->rows());
+            DCHECK_LE(_left_block_start_pos + _left_side_process_count, 
_child_block->rows());
             for (int j = _left_block_start_pos;
                  j < _left_block_start_pos + _left_side_process_count; ++j) {
                 mark_data.emplace_back(IsSemi != 
_cur_probe_row_visited_flags[j]);
-                for (size_t i = 0; i < p._num_probe_side_columns; ++i) {
-                    const vectorized::ColumnWithTypeAndName src_column =
-                            _child_block->get_by_position(i);
-                    DCHECK(p._join_op != TJoinOp::FULL_OUTER_JOIN);
-                    dst_columns[i]->insert_from(*src_column.column, j);
-                }
             }
+            for (size_t i = 0; i < p._num_probe_side_columns; ++i) {
+                const vectorized::ColumnWithTypeAndName src_column =
+                        _child_block->get_by_position(i);
+                DCHECK(p._join_op != TJoinOp::FULL_OUTER_JOIN);
+                dst_columns[i]->insert_range_from(*src_column.column, 
_left_block_start_pos,
+                                                  _left_side_process_count);
+            }
+            for (size_t i = 0; i < p._num_build_side_columns; ++i) {
+                dst_columns[p._num_probe_side_columns + 
i]->insert_many_defaults(
+                        _left_side_process_count);
+            }
+            _resize_fill_tuple_is_null_column(_left_side_process_count, 0, 1);
         }
     }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to