This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 9893fd7d50b branch-3.0: [improve](join) reuse the join block to reduce
malloc memory #43738 (#44774)
9893fd7d50b is described below
commit 9893fd7d50b90d881699fe44e26d614640271862
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Nov 29 19:56:19 2024 +0800
branch-3.0: [improve](join) reuse the join block to reduce malloc memory
#43738 (#44774)
Cherry-picked from #43738
Co-authored-by: zhangstar333 <[email protected]>
---
.../pipeline/exec/nested_loop_join_probe_operator.cpp | 17 +++++++----------
1 file changed, 7 insertions(+), 10 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 4afa9fb8538..bf806196350 100644
--- a/be/src/pipeline/exec/nested_loop_join_probe_operator.cpp
+++ b/be/src/pipeline/exec/nested_loop_join_probe_operator.cpp
@@ -512,23 +512,20 @@ Status NestedLoopJoinProbeOperatorX::pull(RuntimeState*
state, vectorized::Block
local_state._matched_rows_done
: local_state._matched_rows_done);
+ size_t join_block_column_size = local_state._join_block.columns();
{
- vectorized::Block tmp_block = local_state._join_block;
-
- // Here make _join_block release the columns' ptr
-
local_state._join_block.set_columns(local_state._join_block.clone_empty_columns());
-
- local_state.add_tuple_is_null_column(&tmp_block);
+ local_state.add_tuple_is_null_column(&local_state._join_block);
{
SCOPED_TIMER(local_state._join_filter_timer);
RETURN_IF_ERROR(vectorized::VExprContext::filter_block(
- local_state._conjuncts, &tmp_block,
tmp_block.columns()));
+ local_state._conjuncts, &local_state._join_block,
+ local_state._join_block.columns()));
}
- RETURN_IF_ERROR(local_state._build_output_block(&tmp_block, block,
false));
+ RETURN_IF_ERROR(
+ local_state._build_output_block(&local_state._join_block,
block, false));
local_state._reset_tuple_is_null_column();
}
- local_state._join_block.clear_column_data();
-
+ local_state._join_block.clear_column_data(join_block_column_size);
if (!(*eos) and !local_state._need_more_input_data) {
auto func = [&](auto&& join_op_variants, auto set_build_side_flag,
auto set_probe_side_flag) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]