github-actions[bot] commented on code in PR #65327:
URL: https://github.com/apache/doris/pull/65327#discussion_r3535605100


##########
be/src/exec/operator/nested_loop_join_probe_operator.cpp:
##########
@@ -694,7 +694,7 @@ Status 
NestedLoopJoinProbeLocalState::_generate_lazy_block_base_build(RuntimeSta
     }
 
     size_t processed_rows = 0;
-    while (processed_rows + probe_rows <= state->batch_size()) {
+    do {

Review Comment:
   Changing this loop to make oversized inputs advance fixes only the 
build-based path. The lazy probe-based path still has the old pre-entry guard: 
`_generate_lazy_block_base_probe()` increments `_current_build_pos`, then when 
`_join_block.rows() + build_block.rows() > batch_size`, decrements it and 
breaks before `_process_lazy_probe_build_block()` runs. For a lazy materialized 
nested loop join with an oversized build block, `_join_block` is empty and none 
of `_probe_block_pos`, `_current_build_pos`, `_need_more_input_data`, or 
`_matched_rows_done` advances, so `pull()` returns an empty block and retries 
the same state. Please allow the first oversized lazy probe chunk to process as 
well, for example by only delaying once `_join_block` already has rows.



##########
be/src/exec/operator/nested_loop_join_probe_operator.cpp:
##########
@@ -694,7 +694,7 @@ Status 
NestedLoopJoinProbeLocalState::_generate_lazy_block_base_build(RuntimeSta
     }
 
     size_t processed_rows = 0;
-    while (processed_rows + probe_rows <= state->batch_size()) {
+    do {

Review Comment:
   This is a batch-size-sensitive executor bug fix, but the PR only changes the 
operator and does not add a regression or BE test. Please add a case that fails 
on the old prechecked loops, for example a nested loop join with 
`SET_VAR(batch_size=1 or 2)` where the first probe/build chunk to append 
already exceeds the runtime batch size, and include the lazy materialization 
path if feasible.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to