Skip to content

Commit

Permalink
[Enhancement] Check ready_for_next in has_output (backport #34863) (#…
Browse files Browse the repository at this point in the history
…34864)

Signed-off-by: zihe.liu <[email protected]>
  • Loading branch information
ZiheLiu authored Nov 13, 2023
1 parent 9def651 commit 9d64ad2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion be/src/exec/pipeline/scan/scan_operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ bool ScanOperator::has_output() const {

// Can pick up more morsels or submit more tasks
if (!_morsel_queue->empty()) {
return true;
auto status_or_is_ready = _morsel_queue->ready_for_next();
if (status_or_is_ready.ok() && status_or_is_ready.value()) {
return true;
}
}
for (int i = 0; i < _io_tasks_per_scan_operator; ++i) {
std::shared_lock guard(_task_mutex);
Expand Down

0 comments on commit 9d64ad2

Please sign in to comment.