Skip to content

Commit

Permalink
disable mem save code in shuffle
Browse files Browse the repository at this point in the history
  • Loading branch information
HappenLee committed Oct 1, 2024
1 parent ea29138 commit 074a279
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion be/src/pipeline/exec/hashjoin_build_sink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Status HashJoinBuildSinkLocalState::close(RuntimeState* state, Status exec_statu
if (_shared_state->build_block) {
// release the memory of unused column in probe stage
_shared_state->build_block->clear_column_mem_not_keep(
p._should_keep_column_flags, p._shared_hash_table_context.get() != nullptr);
p._should_keep_column_flags, bool(p._shared_hashtable_controller));
}
}

Expand Down
4 changes: 3 additions & 1 deletion be/src/vec/core/block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,9 @@ void Block::clear_column_mem_not_keep(const std::vector<bool>& column_keep_flags
}
}

if (need_keep_first && data[0].column->size() != origin_rows) {
if (need_keep_first && data.size() == column_keep_flags.size() &&
std::all_of(column_keep_flags.begin(), column_keep_flags.end(),
[](bool v) { return v; })) {
auto first_column = data[0].column->clone_empty();
first_column->resize(origin_rows);
data[0].column = std::move(first_column);
Expand Down

0 comments on commit 074a279

Please sign in to comment.