This is an automated email from the ASF dual-hosted git repository.
panxiaolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 358995e4ac5 [Chore](sort) fix block used after it was moved(#29416)
358995e4ac5 is described below
commit 358995e4ac5b7704b5cdb56a7f8b421d0c00a6da
Author: Pxl <[email protected]>
AuthorDate: Wed Jan 3 10:02:35 2024 +0800
[Chore](sort) fix block used after it was moved(#29416)
/mnt/disk2/pengyu/codebase/apache/doris/be/src/vec/common/sort/heap_sorter.cpp:91:23:
error: 'tmp_block' used after it was moved
[bugprone-use-after-move,-warnings-as-errors]
---
be/src/vec/common/sort/heap_sorter.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/be/src/vec/common/sort/heap_sorter.cpp
b/be/src/vec/common/sort/heap_sorter.cpp
index d702cbaca20..19de3838301 100644
--- a/be/src/vec/common/sort/heap_sorter.cpp
+++ b/be/src/vec/common/sort/heap_sorter.cpp
@@ -83,12 +83,11 @@ Status HeapSorter::append_block(Block* block) {
}
Block tmp_block = block->clone_empty();
tmp_block.swap(*block);
+ size_t num_rows = tmp_block.rows();
HeapSortCursorBlockView block_view_val(std::move(tmp_block),
_sort_description);
- SharedHeapSortCursorBlockView* block_view =
- new SharedHeapSortCursorBlockView(std::move(block_view_val));
+ auto* block_view = new
SharedHeapSortCursorBlockView(std::move(block_view_val));
block_view->ref();
Defer defer([&] { block_view->unref(); });
- size_t num_rows = tmp_block.rows();
if (_heap_size == _heap->size()) {
{
SCOPED_TIMER(_topn_filter_timer);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]