This is an automated email from the ASF dual-hosted git repository.
gabriellee 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 b16af25f7ba [pipelineX](fix) fix union operator which return only
const values (#25837)
b16af25f7ba is described below
commit b16af25f7ba5c8a13ead6fce301fe5720c0a2c61
Author: Gabriel <[email protected]>
AuthorDate: Tue Oct 24 18:51:41 2023 +0800
[pipelineX](fix) fix union operator which return only const values (#25837)
---
be/src/pipeline/exec/union_source_operator.cpp | 2 +-
be/src/pipeline/exec/union_source_operator.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/be/src/pipeline/exec/union_source_operator.cpp
b/be/src/pipeline/exec/union_source_operator.cpp
index 0c5b8c78f45..aa85b6fbaf0 100644
--- a/be/src/pipeline/exec/union_source_operator.cpp
+++ b/be/src/pipeline/exec/union_source_operator.cpp
@@ -164,7 +164,7 @@ Status UnionSourceOperatorX::get_block(RuntimeState* state,
vectorized::Block* b
}
local_state.reached_limit(block, source_state);
//have exectue const expr, queue have no data any more, and child could be
colsed
- if (_child_size == 0) {
+ if (_child_size == 0 && !local_state._need_read_for_const_expr) {
source_state = SourceState::FINISHED;
} else if ((!_has_data(state) &&
local_state._shared_state->data_queue.is_all_finish())) {
source_state = SourceState::FINISHED;
diff --git a/be/src/pipeline/exec/union_source_operator.h
b/be/src/pipeline/exec/union_source_operator.h
index 8823b550e55..209d6186997 100644
--- a/be/src/pipeline/exec/union_source_operator.h
+++ b/be/src/pipeline/exec/union_source_operator.h
@@ -140,10 +140,10 @@ public:
private:
bool _has_data(RuntimeState* state) {
+ auto& local_state =
state->get_local_state(id())->cast<UnionSourceLocalState>();
if (_child_size == 0) {
- return false;
+ return local_state._need_read_for_const_expr;
}
- auto& local_state =
state->get_local_state(id())->cast<UnionSourceLocalState>();
return local_state._shared_state->data_queue.remaining_has_data();
}
bool has_more_const(RuntimeState* state) const {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]