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 256051a965 [bug](node) fix partiton sort node core dump when eos 
(#22108)
256051a965 is described below

commit 256051a96518b7b58ee502b85876acb473ca044d
Author: zhangstar333 <87313068+zhangstar...@users.noreply.github.com>
AuthorDate: Sun Jul 23 12:00:53 2023 +0800

    [bug](node) fix partiton sort node core dump when eos (#22108)
    
    fix partiton sort node core dump when eos
---
 be/src/vec/exec/vpartition_sort_node.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/be/src/vec/exec/vpartition_sort_node.cpp 
b/be/src/vec/exec/vpartition_sort_node.cpp
index 8d7e1ec866..c31c8af6a9 100644
--- a/be/src/vec/exec/vpartition_sort_node.cpp
+++ b/be/src/vec/exec/vpartition_sort_node.cpp
@@ -60,9 +60,6 @@ Status VPartitionSortNode::init(const TPlanNode& tnode, 
RuntimeState* state) {
         _partition_exprs_num = _partition_expr_ctxs.size();
         _partition_columns.resize(_partition_exprs_num);
     }
-    if (_partition_exprs_num == 0) {
-        _value_places.push_back(_pool->add(new PartitionBlocks()));
-    }
 
     _has_global_limit = tnode.partition_sort_node.has_global_limit;
     _top_n_algorithm = tnode.partition_sort_node.top_n_algorithm;
@@ -177,6 +174,9 @@ Status VPartitionSortNode::sink(RuntimeState* state, 
vectorized::Block* input_bl
     if (current_rows > 0) {
         child_input_rows = child_input_rows + current_rows;
         if (UNLIKELY(_partition_exprs_num == 0)) {
+            if (UNLIKELY(_value_places.empty())) {
+                _value_places.push_back(_pool->add(new PartitionBlocks()));
+            }
             //no partition key
             _value_places[0]->append_whole_block(input_block, 
child(0)->row_desc());
         } else {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to