yiguolei commented on code in PR #61535:
URL: https://github.com/apache/doris/pull/61535#discussion_r3123049942
##########
be/src/exec/operator/nested_loop_join_probe_operator.cpp:
##########
@@ -387,23 +411,34 @@ Status
NestedLoopJoinProbeLocalState::generate_other_join_block_data(RuntimeStat
if (_matched_rows_done &&
_output_null_idx_build_side < _shared_state->build_blocks.size()) {
_finalize_current_phase<true, JoinOpType::value ==
TJoinOp::RIGHT_SEMI_JOIN>(
- _join_block, state->batch_size());
+ _join_block, state->batch_size(),
state->preferred_block_size_bytes());
}
}
return Status::OK();
}
template <bool BuildSide, bool IsSemi>
-void NestedLoopJoinProbeLocalState::_finalize_current_phase(Block& block,
size_t batch_size) {
+void NestedLoopJoinProbeLocalState::_finalize_current_phase(Block& block,
size_t batch_size,
+ size_t
block_max_bytes) {
auto& p = _parent->cast<NestedLoopJoinProbeOperatorX>();
auto dst_columns = block.mutate_columns();
DCHECK_GT(dst_columns.size(), 0);
auto column_size = dst_columns[0]->size();
+ // Precompute effective batch size from estimated bytes per row to avoid
per-iteration byte sum
+ size_t effective_batch_size = batch_size;
+ if (column_size > 0) {
+ size_t current_bytes = 0;
Review Comment:
这种逻辑,在block 中没有公共的util 方法吗?
--
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]