Commits


Weston Pace authored and GitHub committed 295c6644ca6
GH-32653: [C++] Cleanup error handling in execution engine (#15253) Simplifies error handling in exec plans. There were several different places that exec plan failures could be reported. Now there is just one. The `ExecNode::ErrorReceived` mechanism was removed. Now `InputReceived` and `InputFinished` return a `Status` instead. This allows for use of the existing macros instead of things like `ErrorNotOk` and removes the burden of error propagation from nodes and removes the burden of error handling from sink nodes. `ExecNode::finished` has now been removed. This could lead to deadlock if nodes failed to mark the future complete (this was easy to do in error scenarios). In addition, it served no real purpose. A plan is done when all of its tasks have finished. BREAKING CHANGE: ExecPlan::StartProducing now returns void. Errors that were returned from this method will now be returned from `ExecPlan::finished`. BREAKING CHANGE: If a plan is stopped early (with `ExecPlan::StopProducing`) then it will complete with a cancelled status instead of an ok status (assuming no other errors). This is to reflect the fact that the plan did not produce complete data. BREAKING CHANGE: Previously the sink node would push some plan errors onto the generator. Now, all errors will be output on `ExecPlan::finished`. The sink node will never push an error, only batches. Readers should make sure to check `ExecPlan::finished`. BREAKING CHANGE: When a plan is cancelled it will no longer attempt to flush output. For example, a plan with an aggregate node will not produce an aggregation based on partial results after a cancel. * Closes: #32653 Authored-by: Weston Pace <weston.pace@gmail.com> Signed-off-by: Weston Pace <weston.pace@gmail.com>