You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by pa...@apache.org on 2023/01/05 09:08:41 UTC

[doris] branch branch-1.2-lts updated: [Bug](execute) fix get next non stop for eos on streaming preagg (#15616)

This is an automated email from the ASF dual-hosted git repository.

panxiaolei pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
     new 8a6bd5bd3e [Bug](execute) fix get next non stop for eos on streaming preagg (#15616)
8a6bd5bd3e is described below

commit 8a6bd5bd3e593d5f88fd3a415935178fa4ee1038
Author: Pxl <px...@qq.com>
AuthorDate: Thu Jan 5 17:08:31 2023 +0800

    [Bug](execute) fix get next non stop for eos on streaming preagg (#15616)
---
 be/src/vec/exec/vaggregation_node.cpp | 11 +++++------
 be/src/vec/exec/vaggregation_node.h   |  1 +
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/be/src/vec/exec/vaggregation_node.cpp b/be/src/vec/exec/vaggregation_node.cpp
index e003adfdea..9056dee8ca 100644
--- a/be/src/vec/exec/vaggregation_node.cpp
+++ b/be/src/vec/exec/vaggregation_node.cpp
@@ -497,15 +497,14 @@ Status AggregationNode::get_next(RuntimeState* state, Block* block, bool* eos) {
     SCOPED_CONSUME_MEM_TRACKER(mem_tracker());
 
     if (_is_streaming_preagg) {
-        bool child_eos = false;
-
         RETURN_IF_CANCELLED(state);
-        do {
+        release_block_memory(_preagg_block);
+        while (_preagg_block.rows() == 0 && !_child_eos) {
             release_block_memory(_preagg_block);
             RETURN_IF_ERROR_AND_CHECK_SPAN(
-                    _children[0]->get_next_after_projects(state, &_preagg_block, &child_eos),
-                    _children[0]->get_next_span(), child_eos);
-        } while (_preagg_block.rows() == 0 && !child_eos);
+                    _children[0]->get_next_after_projects(state, &_preagg_block, &_child_eos),
+                    _children[0]->get_next_span(), _child_eos);
+        }
 
         if (_preagg_block.rows() != 0) {
             RETURN_IF_ERROR(_executor.pre_agg(&_preagg_block, block));
diff --git a/be/src/vec/exec/vaggregation_node.h b/be/src/vec/exec/vaggregation_node.h
index 3612df001f..23203380ff 100644
--- a/be/src/vec/exec/vaggregation_node.h
+++ b/be/src/vec/exec/vaggregation_node.h
@@ -822,6 +822,7 @@ private:
     bool _is_streaming_preagg;
     Block _preagg_block = Block();
     bool _should_expand_hash_table = true;
+    bool _child_eos = false;
 
     bool _should_limit_output = false;
     bool _reach_limit = false;


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