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

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git

commit ae926d0d8c1b2f5bad3951619d6b83d93860a09a
Author: Gabriel <[email protected]>
AuthorDate: Thu Feb 29 22:16:27 2024 +0800

    [pipelineX](bug) Fix core dump if union has no children (#31611)
---
 be/src/pipeline/exec/union_source_operator.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/be/src/pipeline/exec/union_source_operator.cpp 
b/be/src/pipeline/exec/union_source_operator.cpp
index dc1de2900b9..213b9bc0d3f 100644
--- a/be/src/pipeline/exec/union_source_operator.cpp
+++ b/be/src/pipeline/exec/union_source_operator.cpp
@@ -182,7 +182,8 @@ Status UnionSourceOperatorX::get_block(RuntimeState* state, 
vectorized::Block* b
     local_state.reached_limit(block, eos);
     //have executing const expr, queue have no data anymore, and child could 
be closed
     *eos = (_child_size == 0 && !local_state._need_read_for_const_expr) ||
-           (local_state._shared_state->data_queue.is_all_finish() && 
!_has_data(state));
+           (_child_size > 0 && 
local_state._shared_state->data_queue.is_all_finish() &&
+            !_has_data(state));
 
     return Status::OK();
 }


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

Reply via email to