github-actions[bot] commented on code in PR #64596:
URL: https://github.com/apache/doris/pull/64596#discussion_r3450786289
##########
be/src/exec/operator/nested_loop_join_probe_operator.cpp:
##########
@@ -695,19 +721,28 @@ Status
NestedLoopJoinProbeLocalState::_generate_lazy_block_base_build(RuntimeSta
size_t processed_rows = 0;
while (processed_rows + probe_rows <= state->batch_size()) {
- if (_probe_block_pos == probe_rows) {
- _current_build_row_pos++;
- _probe_block_pos = 0;
-
- if (_current_build_row_pos >= build_rows) {
+ if (_current_build_pos >= build_blocks.size()) {
Review Comment:
This check can observe `build_blocks.size()` and `build_side_eos` from
different moments. If the probe has consumed `N` published blocks, it can read
size `N` here, then the build sink appends the final block and sets
`build_side_eos = true`; the probe then takes the EOS branch and treats the
current probe block as complete without ever joining it with that final block.
That can drop inner/cross join rows. Please make the block count and EOS state
a consistent snapshot, or re-read the size after seeing EOS and continue when
`_current_build_pos` is now within the published range.
##########
be/src/exec/operator/nested_loop_join_probe_operator.cpp:
##########
@@ -695,19 +721,28 @@ Status
NestedLoopJoinProbeLocalState::_generate_lazy_block_base_build(RuntimeSta
size_t processed_rows = 0;
while (processed_rows + probe_rows <= state->batch_size()) {
- if (_probe_block_pos == probe_rows) {
- _current_build_row_pos++;
- _probe_block_pos = 0;
Review Comment:
This check can observe `build_blocks.size()` and `build_side_eos` from
different moments. If the probe has consumed `N` published blocks, it can read
size `N` here, then the build sink appends the final block and sets
`build_side_eos = true`; the probe then takes the EOS branch and treats the
current probe block as complete without ever joining it with that final block.
That can drop inner/cross join rows. Please make the block count and EOS state
a consistent snapshot, or re-read the size after seeing EOS and continue when
`_current_build_pos` is now within the published range.
--
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]