Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](pipeline) sort_merge should throw exception in has_next_block if got failed status #29076

Merged
merged 2 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions be/src/vec/core/sort_cursor.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ struct BlockSupplierSortCursorImpl : public MergeSortCursorImpl {
}
MergeSortCursorImpl::reset(_block);
return status.ok();
} else if (!status.ok()) {
throw std::runtime_error(status.msg());
}
return false;
}
Expand Down
14 changes: 9 additions & 5 deletions be/src/vec/runtime/vsorted_run_merger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,16 @@ void VSortedRunMerger::init_timers(RuntimeProfile* profile) {
}

Status VSortedRunMerger::prepare(const vector<BlockSupplier>& input_runs) {
for (const auto& supplier : input_runs) {
if (_use_sort_desc) {
_cursors.emplace_back(supplier, _desc);
} else {
_cursors.emplace_back(supplier, _ordering_expr, _is_asc_order, _nulls_first);
try {
for (const auto& supplier : input_runs) {
if (_use_sort_desc) {
_cursors.emplace_back(supplier, _desc);
} else {
_cursors.emplace_back(supplier, _ordering_expr, _is_asc_order, _nulls_first);
}
}
} catch (const std::exception& e) {
return Status::Cancelled(e.what());
}

for (auto& _cursor : _cursors) {
Expand Down
Loading