pitrou commented on code in PR #45268:
URL: https://github.com/apache/arrow/pull/45268#discussion_r1944329079


##########
cpp/src/arrow/acero/task_util.cc:
##########
@@ -369,17 +369,25 @@ Status TaskSchedulerImpl::ScheduleMore(size_t thread_id, 
int num_tasks_finished)
     int group_id = tasks[i].first;
     int64_t task_id = tasks[i].second;
     RETURN_NOT_OK(schedule_impl_([this, group_id, task_id](size_t thread_id) 
-> Status {
-      RETURN_NOT_OK(ScheduleMore(thread_id, 1));
-
       bool task_group_finished = false;
-      RETURN_NOT_OK(ExecuteTask(thread_id, group_id, task_id, 
&task_group_finished));
+      // PostExecuteTask must be called later if any error ocurres during task 
execution
+      // (including ScheduleMore), so we preserve the status.
+      auto status = [&]() {

Review Comment:
   Fair enough, thank you.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to