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

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 90e7f70  [Bug] Fix bug that query multi mysql external table with 
union will get incomplete result (#5067)
90e7f70 is described below

commit 90e7f7005efb5000b2b260069cc6a575ee02ccea
Author: Mingyu Chen <[email protected]>
AuthorDate: Tue Dec 15 09:28:39 2020 +0800

    [Bug] Fix bug that query multi mysql external table with union will get 
incomplete result (#5067)
    
    The `eos` flag should be reset to false after opening next child of union 
node.
---
 be/src/exec/union_node.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/be/src/exec/union_node.cpp b/be/src/exec/union_node.cpp
index e860f12..611561e 100644
--- a/be/src/exec/union_node.cpp
+++ b/be/src/exec/union_node.cpp
@@ -119,7 +119,10 @@ Status UnionNode::get_next_pass_through(RuntimeState* 
state, RowBatch* row_batch
     DCHECK(is_child_passthrough(_child_idx));
     // TODO(zc)
     // 
DCHECK(child(_child_idx)->row_desc().LayoutEquals(row_batch->row_desc()));
-    if (_child_eos) RETURN_IF_ERROR(child(_child_idx)->open(state));
+    if (_child_eos) {
+        RETURN_IF_ERROR(child(_child_idx)->open(state));
+        _child_eos = false;
+    }
     DCHECK_EQ(row_batch->num_rows(), 0);
     RETURN_IF_ERROR(child(_child_idx)->get_next(state, row_batch, 
&_child_eos));
     if (_child_eos) {
@@ -156,7 +159,10 @@ Status UnionNode::get_next_materialized(RuntimeState* 
state, RowBatch* row_batch
             _child_row_idx = 0;
             // open the current child unless it's the first child, which was 
already opened in
             // UnionNode::open().
-            if (_child_eos) RETURN_IF_ERROR(child(_child_idx)->open(state));
+            if (_child_eos) {
+                RETURN_IF_ERROR(child(_child_idx)->open(state));
+                _child_eos = false;
+            }
             // The first batch from each child is always fetched here.
             RETURN_IF_ERROR(child(_child_idx)->get_next(state, 
_child_batch.get(), &_child_eos));
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to