Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

[NSE-1141] Replace ValueOrDie with status check to avoid executor die #1143

Merged
merged 1 commit into from
Oct 24, 2022
Merged
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
6 changes: 5 additions & 1 deletion native-sql-engine/cpp/src/codegen/common/relation_column.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ class LazyBatchIterator {

bool AdvanceTo(int32_t batch_id) {
for (; current_batch_id_ <= batch_id; current_batch_id_++) {
std::shared_ptr<arrow::RecordBatch> next = in_.Next().ValueOrDie();
auto result = in_.Next();
if (!result.ok()) {
throw JniPendingException("Get next batch failed.");
}
std::shared_ptr<arrow::RecordBatch> next = result.ValueUnsafe();
if (next == nullptr) {
return false;
}
Expand Down